summaryrefslogtreecommitdiffstats
path: root/branches/1.0/tinyNET
diff options
context:
space:
mode:
Diffstat (limited to 'branches/1.0/tinyNET')
-rw-r--r--branches/1.0/tinyNET/Doxyfile1689
-rw-r--r--branches/1.0/tinyNET/Makefile.am3
-rw-r--r--branches/1.0/tinyNET/autogen.sh17
-rw-r--r--branches/1.0/tinyNET/config.h8
-rw-r--r--branches/1.0/tinyNET/configure.ac75
-rw-r--r--branches/1.0/tinyNET/droid-makefile89
-rw-r--r--branches/1.0/tinyNET/footer.html7
-rw-r--r--branches/1.0/tinyNET/header.html38
-rw-r--r--branches/1.0/tinyNET/installdox.sh1
-rw-r--r--branches/1.0/tinyNET/ragel.sh8
-rw-r--r--branches/1.0/tinyNET/ragel/tnet_dns_regexp.rl351
-rw-r--r--branches/1.0/tinyNET/ragel/tnet_dns_resolvconf.rl145
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp.c338
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp.h121
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.c355
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.h226
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.c326
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.h291
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.c131
-rw-r--r--branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.h62
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.c269
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.h128
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.c288
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.h185
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.c137
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.h143
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.c336
-rw-r--r--branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.h246
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns.c973
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns.h125
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_a.c106
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_a.h61
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.c108
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.h58
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_cname.c97
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_cname.h63
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_message.c364
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_message.h209
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_mx.c99
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_mx.h66
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_naptr.c146
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_naptr.h81
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_ns.c96
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_ns.h63
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_opt.c91
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_opt.h54
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_ptr.c97
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_ptr.h61
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_regexp.c508
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_regexp.h41
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.c301
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.h43
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_rr.c452
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_rr.h171
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_soa.c112
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_soa.h82
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_srv.c137
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_srv.h59
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_txt.c96
-rw-r--r--branches/1.0/tinyNET/src/dns/tnet_dns_txt.h61
-rw-r--r--branches/1.0/tinyNET/src/ice/tnet_ice.c32
-rw-r--r--branches/1.0/tinyNET/src/ice/tnet_ice.h42
-rw-r--r--branches/1.0/tinyNET/src/stun/tnet_stun.c440
-rw-r--r--branches/1.0/tinyNET/src/stun/tnet_stun.h128
-rw-r--r--branches/1.0/tinyNET/src/stun/tnet_stun_attribute.c960
-rw-r--r--branches/1.0/tinyNET/src/stun/tnet_stun_attribute.h329
-rw-r--r--branches/1.0/tinyNET/src/stun/tnet_stun_message.c440
-rw-r--r--branches/1.0/tinyNET/src/stun/tnet_stun_message.h240
-rw-r--r--branches/1.0/tinyNET/src/tinynet.h58
-rw-r--r--branches/1.0/tinyNET/src/tinynet_config.h120
-rw-r--r--branches/1.0/tinyNET/src/tls/tnet_tls.c486
-rw-r--r--branches/1.0/tinyNET/src/tls/tnet_tls.h57
-rw-r--r--branches/1.0/tinyNET/src/tnet.c143
-rw-r--r--branches/1.0/tinyNET/src/tnet.h45
-rw-r--r--branches/1.0/tinyNET/src/tnet_auth.c30
-rw-r--r--branches/1.0/tinyNET/src/tnet_auth.h39
-rw-r--r--branches/1.0/tinyNET/src/tnet_endianness.c98
-rw-r--r--branches/1.0/tinyNET/src/tnet_endianness.h53
-rw-r--r--branches/1.0/tinyNET/src/tnet_hardwares.h64
-rw-r--r--branches/1.0/tinyNET/src/tnet_nat.c570
-rw-r--r--branches/1.0/tinyNET/src/tnet_nat.h120
-rw-r--r--branches/1.0/tinyNET/src/tnet_poll.c109
-rw-r--r--branches/1.0/tinyNET/src/tnet_poll.h92
-rw-r--r--branches/1.0/tinyNET/src/tnet_proto.h196
-rw-r--r--branches/1.0/tinyNET/src/tnet_socket.c326
-rw-r--r--branches/1.0/tinyNET/src/tnet_socket.h167
-rw-r--r--branches/1.0/tinyNET/src/tnet_transport.c494
-rw-r--r--branches/1.0/tinyNET/src/tnet_transport.h143
-rw-r--r--branches/1.0/tinyNET/src/tnet_transport_poll.c829
-rw-r--r--branches/1.0/tinyNET/src/tnet_transport_win32.c786
-rw-r--r--branches/1.0/tinyNET/src/tnet_types.h111
-rw-r--r--branches/1.0/tinyNET/src/tnet_utils.c1593
-rw-r--r--branches/1.0/tinyNET/src/tnet_utils.h176
-rw-r--r--branches/1.0/tinyNET/src/turn/tnet_turn.c700
-rw-r--r--branches/1.0/tinyNET/src/turn/tnet_turn.h175
-rw-r--r--branches/1.0/tinyNET/src/turn/tnet_turn_attribute.c649
-rw-r--r--branches/1.0/tinyNET/src/turn/tnet_turn_attribute.h196
-rw-r--r--branches/1.0/tinyNET/src/turn/tnet_turn_message.c170
-rw-r--r--branches/1.0/tinyNET/src/turn/tnet_turn_message.h75
-rw-r--r--branches/1.0/tinyNET/test/droid-makefile28
-rw-r--r--branches/1.0/tinyNET/test/stdafx.c26
-rw-r--r--branches/1.0/tinyNET/test/stdafx.h38
-rw-r--r--branches/1.0/tinyNET/test/targetver.h15
-rw-r--r--branches/1.0/tinyNET/test/test.c116
-rw-r--r--branches/1.0/tinyNET/test/test.vcproj414
-rw-r--r--branches/1.0/tinyNET/test/test_auth.h31
-rw-r--r--branches/1.0/tinyNET/test/test_dhcp.h121
-rw-r--r--branches/1.0/tinyNET/test/test_dhcp6.h51
-rw-r--r--branches/1.0/tinyNET/test/test_dns.h227
-rw-r--r--branches/1.0/tinyNET/test/test_ifaces.h102
-rw-r--r--branches/1.0/tinyNET/test/test_nat.h219
-rw-r--r--branches/1.0/tinyNET/test/test_sockets.h64
-rw-r--r--branches/1.0/tinyNET/test/test_stun.h112
-rw-r--r--branches/1.0/tinyNET/test/test_tls.h108
-rw-r--r--branches/1.0/tinyNET/test/test_transport.h222
-rw-r--r--branches/1.0/tinyNET/tinyNET.sln44
-rw-r--r--branches/1.0/tinyNET/tinyNET.tag14862
-rw-r--r--branches/1.0/tinyNET/tinyNET.vcproj771
118 files changed, 0 insertions, 40146 deletions
diff --git a/branches/1.0/tinyNET/Doxyfile b/branches/1.0/tinyNET/Doxyfile
deleted file mode 100644
index f7777eb..0000000
--- a/branches/1.0/tinyNET/Doxyfile
+++ /dev/null
@@ -1,1689 +0,0 @@
-# Doxyfile 1.7.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = tinyNET
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 1.0
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = docs
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH = /Users/dimitri/doxygen/mail/1.5.7/doxywizard/
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = YES
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 62
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = src
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.vhd *.vhdl
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.idl \
- *.odl \
- *.cs \
- *.php \
- *.php3 \
- *.inc \
- *.m \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.vhd \
- *.vhdl \
- *.asm
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = images
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [0,1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-# Note that a value of 0 will completely suppress the enum values from
-# appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES = ../tinySAK/tinySAK.tag=http://doubango.org/API/tinySAK
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE = tinyNET.tag
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = YES
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = NO
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif.
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
diff --git a/branches/1.0/tinyNET/Makefile.am b/branches/1.0/tinyNET/Makefile.am
deleted file mode 100644
index 4e61f0f..0000000
--- a/branches/1.0/tinyNET/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = \
- src \
- test \ No newline at end of file
diff --git a/branches/1.0/tinyNET/autogen.sh b/branches/1.0/tinyNET/autogen.sh
deleted file mode 100644
index 9c875b0..0000000
--- a/branches/1.0/tinyNET/autogen.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-echo libtoolize
-libtoolize --copy --force
-
-echo "aclocal"
-aclocal
-
-echo "autoheader"
-autoheader
-
-echo "create NEWS, README, AUTHORS and ChangeLog"
-touch NEWS README AUTHORS ChangeLog
-
-echo "automake"
-automake -a
-
-echo "autoconf"
-autoconf \ No newline at end of file
diff --git a/branches/1.0/tinyNET/config.h b/branches/1.0/tinyNET/config.h
deleted file mode 100644
index d367d15..0000000
--- a/branches/1.0/tinyNET/config.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TINYNET_CONFIG_H
-#define TINYNET_CONFIG_H
-
-#if defined (__APPLE__)
-# define TNET_USE_POLL 1
-#endif
-
-#endif /* TINYNET_CONFIG_H */ \ No newline at end of file
diff --git a/branches/1.0/tinyNET/configure.ac b/branches/1.0/tinyNET/configure.ac
deleted file mode 100644
index 3cee90d..0000000
--- a/branches/1.0/tinyNET/configure.ac
+++ /dev/null
@@ -1,75 +0,0 @@
-AC_PREREQ([2.52])
-AC_INIT(libtinySAK, 0.1, diopmamadou@doubango.org)
-AM_INIT_AUTOMAKE
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_SRCDIR([src/tsk.c])
-
-dnl find suitable C++ compiler
-AC_PROG_CC
-AC_PROG_INSTALL
-
-
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
-
-## Are we using Windows?
-#dnl detecting WIN32
-#case "$host" in
-# *cygwin* | *mingw*)
-# AC_DEFINE([WIN32], [], "Using Windows as target os.")
-# ;;
-# *)
-# AC_MSG_RESULT(${host} is not Windows... I will do my best.)
-# ;;
-#esac
-
-# CFLAGS
-CFLAGS="${CFLAGS=}"
-
-#echo Setting up build environment for ${target_cpu}${target_os}
-
-### ENABLE-DEBUG
-AC_MSG_CHECKING(whether to enable debugging)
-debug_default="yes"
-AC_ARG_ENABLE(debug,
-[ --enable-debug[=no/yes] turn on/off debugging
- [[default=$debug_default]]],
-[ if test "x$enableval" = "xyes" ; then
- CFLAGS="$CFLAGS -O0 -g3 -DDEBUG"
- AC_MSG_RESULT(yes)
- else
- CFLAGS="$CFLAGS -O3 -NDEBUG"
- AC_MSG_RESULT(no)
- fi
-],
-[CFLAGS="$CFLAGS -O0 -g3 -DDEBUG"
- AC_MSG_RESULT(yes)])
-
-### DEBUG-LEVEL
-AC_ARG_WITH(debug-level,
-[ --with-debug-level[=level] Set debug-level to level [[default=info]]
- info: informational
- warn: warnings
- error [default]: errors
- fatal: fatal],
-[ if test "x$withval" = "xinfo" ; then
- AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_INFO, [info debug])
- AC_MSG_RESULT(info)
- elif test "x$withval" = "xwarn" ; then
- AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_INFO, [warn debug])
- AC_MSG_RESULT(warn)
- elif test "x$withval" = "xerror" ; then
- AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_ERROR, [error debug])
- AC_MSG_RESULT(error)
- elif test "x$withval" = "xfatal" ; then
- AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_FATAL, [fatal debug])
- AC_MSG_RESULT(fatal)
- fi
-])
-
-
-AC_OUTPUT(
-Makefile
-src/Makefile
-test/Makefile
-) \ No newline at end of file
diff --git a/branches/1.0/tinyNET/droid-makefile b/branches/1.0/tinyNET/droid-makefile
deleted file mode 100644
index ee49210..0000000
--- a/branches/1.0/tinyNET/droid-makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-APP := lib$(PROJECT)_$(MARCH).$(EXT)
-
-CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I./src
-LDFLAGS := $(LDFLAGS_LIB) -ltinySAK_$(MARCH)
-
-all: $(APP)
-
-OBJS = \
- src/tnet.o\
- src/tnet_auth.o\
- src/tnet_endianness.o\
- src/tnet_nat.o\
- src/tnet_poll.o\
- src/tnet_socket.o\
- src/tnet_transport.o\
- src/tnet_transport_poll.o\
- src/tnet_utils.o
- ###################
- ## DHCP
- ###################
-OBJS += src/dhcp/tnet_dhcp.o\
- src/dhcp/tnet_dhcp_message.o\
- src/dhcp/tnet_dhcp_option.o\
- src/dhcp/tnet_dhcp_option_sip.o
- ###################
- ## DHCPv6
- ###################
-OBJS += src/dhcp6/tnet_dhcp6.o\
- src/dhcp6/tnet_dhcp6_duid.o\
- src/dhcp6/tnet_dhcp6_message.o\
- src/dhcp6/tnet_dhcp6_option.o
- ###################
- ## DNS
- ###################
-OBJS += src/dns/tnet_dns.o\
- src/dns/tnet_dns_a.o\
- src/dns/tnet_dns_aaaa.o\
- src/dns/tnet_dns_cname.o\
- src/dns/tnet_dns_message.o\
- src/dns/tnet_dns_mx.o\
- src/dns/tnet_dns_naptr.o\
- src/dns/tnet_dns_ns.o\
- src/dns/tnet_dns_opt.o\
- src/dns/tnet_dns_ptr.o\
- src/dns/tnet_dns_regexp.o\
- src/dns/tnet_dns_resolvconf.o\
- src/dns/tnet_dns_rr.o\
- src/dns/tnet_dns_soa.o\
- src/dns/tnet_dns_srv.o\
- src/dns/tnet_dns_txt.o
- ###################
- ## ICE
- ###################
-OBJS += src/ice/tnet_ice.o
-
- ###################
- ## STUN
- ###################
-OBJS += src/stun/tnet_stun.o\
- src/stun/tnet_stun_attribute.o\
- src/stun/tnet_stun_message.o
- ###################
- ## TLS
- ###################
-OBJS += src/tls/tnet_tls.o
- ###################
- ## TURN
- ###################
-OBJS += src/turn/tnet_turn.o\
- src/turn/tnet_turn_attribute.o\
- src/turn/tnet_turn_message.o
-
-$(APP): $(OBJS)
-ifeq ($(EXT), a)
- $(AR) rcs $@ $^
-else
- $(CC) $(LDFLAGS) -o $@ $^
-endif
-
-%.o: %.c
- $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
-
-install: $(APP)
- $(ANDROID_SDK_ROOT)/tools/adb remount
- $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
- $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
-
-clean:
- @rm -f $(OBJS) $(APP) \ No newline at end of file
diff --git a/branches/1.0/tinyNET/footer.html b/branches/1.0/tinyNET/footer.html
deleted file mode 100644
index 50a7d2e..0000000
--- a/branches/1.0/tinyNET/footer.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<html>
-<head></head>
-<body>
-<hr>
-<b>doubango project - tinyNET 1.0</b> - Copyright (C) 2009-2010 Mamadou DIOP. All rights reserved. Licensed under the terms of the GNU General Public License v3.
-</body>
-</html> \ No newline at end of file
diff --git a/branches/1.0/tinyNET/header.html b/branches/1.0/tinyNET/header.html
deleted file mode 100644
index 1346281..0000000
--- a/branches/1.0/tinyNET/header.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>doubango - tinyNET</title>
- <link rel="stylesheet" href="http://www.doubango.org/css.css" type="text/css" />
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css"/>
- <meta name="Keywords" content="doubango, 3GPP IMS/LTE framework, open source, SIP, RFC 3261, 3GPP TS 24.229, VoIP, MMTel, IPTV, 4G, LTE, XCAP, MSRP, IPSec, SigComp, One Voice " />
- <meta name="Description" content="cross-platform and open source 3GPP IMS/LTE framework for embedded devices such as Android, Symbian, iPhone, Windows Mobile or uLinux." />
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-
-<style type="text/css">
-/*<![CDATA[*/
- p.c1 {text-align: center;}
-/*]]>*/
-</style>
-</head>
-
-<body>
- <div id="left">
- <div id="border">
- <div id="logo">
- <p class="companyname">
- tinyNET</p>
- </div>
- <div id="menu">
- <a href="/index.html" title="Homepage">Home</a> <a href="/gettingstarted.html" title="Getting Started">
- Getting Started</a> <a href="http://code.google.com/p/doubango/source/checkout" title="Source Code"
- target="_blank">Source Code</a> <a href="/apiref.html" title="API Reference">API Reference</a> <a href="contact.html" title="Contact">
- Contact</a>
- </div>
- </div>
- </div>
-</body>
-</html>
-
diff --git a/branches/1.0/tinyNET/installdox.sh b/branches/1.0/tinyNET/installdox.sh
deleted file mode 100644
index 2517e03..0000000
--- a/branches/1.0/tinyNET/installdox.sh
+++ /dev/null
@@ -1 +0,0 @@
-docs/html/installdox -l tinySAK.tag@http://doubango.org/API/tinySAK docs/html/*.html \ No newline at end of file
diff --git a/branches/1.0/tinyNET/ragel.sh b/branches/1.0/tinyNET/ragel.sh
deleted file mode 100644
index 400a5d7..0000000
--- a/branches/1.0/tinyNET/ragel.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-# Ragel generator
-# For more information about Ragel: http://www.complang.org/ragel/
-
-export OPTIONS="-C -L -T0"
-#export OPTIONS="-C -L -G2"
-
-ragel.exe $OPTIONS -o ./src/dns/tnet_dns_regexp.c ./ragel/tnet_dns_regexp.rl
-ragel.exe $OPTIONS -o ./src/dns/tnet_dns_resolvconf.c ./ragel/tnet_dns_resolvconf.rl
diff --git a/branches/1.0/tinyNET/ragel/tnet_dns_regexp.rl b/branches/1.0/tinyNET/ragel/tnet_dns_regexp.rl
deleted file mode 100644
index 24de97b..0000000
--- a/branches/1.0/tinyNET/ragel/tnet_dns_regexp.rl
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_regexp.h
- * @brief DNS Regex parser for NAPTR RR.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_regexp.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_ragel_state.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-/* === Ragel state machine === */
-%%{
- machine tdns_machine_regexp;
-
- action tag{
- tag_start = p;
- }
-
- action parse_prefix{
- TSK_PARSER_SET_STRING(prefix);
- }
-
- action cat_any{
- int len = (int)(p - tag_start);
- if(len){
- tsk_strncat(&ret, tag_start, len);
- }
- }
-
- action cat_group{
- if(prefix){
- int prefixlen = tsk_strlen(prefix);
- tsk_strncat(&ret, e164num + prefixlen, (e164len - prefixlen));
- }
- }
-
- # http://www.itu.int/itudoc/itu-t/workshop/enum/012_pp7.ppt
- # The format is like this: !<regexp>!<string>!
- # * 1. Match <regexp> on the original E.164 number
- # * 2. Apply rewrite rule <string>
- # * \n in <string> is replaced with group number 'n' in <regexp>
- #
-
- regexp = (".*") | ("\\"? <:any*>tag %parse_prefix :>"(.*)");
- group = "\\" digit;
- string = (any -- "\\")*>tag %cat_any (group >tag %cat_group)? (any -- "\\")*>tag %cat_any;
-
- # Supported regexp --> !^.*$! or !^+1800(.*)! where "1800" is called the prefix
- main := "!^"<: regexp :> "$!" <: string :>"!" "i"?;
-}%%
-
-/**
-* Apply @a regexp to @a e164num.
-* @param e164num Original E.164 number supplied by the user (only digits or '+' are accepted).
-* @param regexp A <character-string> containing a substitution expression that is
-* applied to the original string held by the client in order to
-* construct the next domain name to lookup. Example: "!^.*$!sip:bob@doubango.org!i".
-* @retval The final Internet address. It's up to the caller to free the string.
-*/
-char* tnet_dns_regex_parse(const char* e164num, const char* regexp)
-{
- char* ret = tsk_null;
- char* prefix = tsk_null;
- const char* tag_start;
- tsk_size_t e164len;
-
- // Ragel
- int cs = 0;
- const char *p = tag_start = regexp;
- const char *pe;
- const char *eof;
-
- %%write data;
-
- if(!e164num){
- goto bail;
- }
-
- if(!regexp){
- ret = tsk_strdup(e164num);
- goto bail;
- }
-
- e164len = tsk_strlen(e164num);
- pe = p + tsk_strlen(regexp);
- eof = pe;
-
- %%write init;
- %%write exec;
-
- if( cs < %%{ write first_final; }%% ){
- TSK_DEBUG_ERROR("regexp substitition failed.");
- TSK_FREE(ret);
- }
-
-bail:
- TSK_FREE(prefix);
-
- return ret;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-///*
-//* Copyright (C) 2009-2010 Mamadou Diop.
-//*
-//* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-//*
-//* This file is part of Open Source Doubango Framework.
-//*
-//* DOUBANGO 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.
-//*
-//* DOUBANGO 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 DOUBANGO.
-//*
-//*/
-///**@file tnet_dns_regexp.h
-// * @brief DNS Regex parser for NAPTR RR.
-// *
-// * @author Mamadou Diop <diopmamadou(at)doubango.org>
-// *
-// * @date Created: Sat Nov 8 16:54:58 2009 mdiop
-// */
-//#include "tnet_dns_regexp.h"
-//
-//#include "tsk_debug.h"
-//#include "tsk_memory.h"
-//#include "tsk_string.h"
-//#include "tsk_list.h"
-//
-//#include <string.h>
-//
-//const tsk_object_def_t *group_def_t;
-//typedef tsk_list_t groups_L_t;
-//
-//#define CREATE_GROUP(id) tsk_object_new(group_def_t, (int)id)
-//typedef struct group_s
-//{
-// TSK_DECLARE_OBJECT;
-//
-// int id;
-// tsk_size_t start;
-// tsk_size_t end;
-//}
-//group_t;
-//
-///* === Ragel state machine === */
-//%%{
-// machine tdns_machine_regexp;
-//
-// action tag{
-// tag_start = p;
-// }
-//
-// action inc_index{
-// index++;
-// TSK_DEBUG_INFO("inc_index %d", index);
-// }
-//
-// action create_group{
-// if(curr_group){
-// TSK_OBJECT_SAFE_FREE(curr_group);
-// }
-// curr_group = CREATE_GROUP(++group_id);
-// curr_group->start = index;
-// TSK_DEBUG_INFO("Create groupe");
-// }
-//
-// action add_group{
-// curr_group->end = index;
-// tsk_list_push_back_data(groups, (void**)&curr_group);
-// TSK_DEBUG_INFO("Create groupe");
-// }
-//
-// # http://www.itu.int/itudoc/itu-t/workshop/enum/012_pp7.ppt
-// # The format is like this: !<regexp>!<string>!
-// # * 1. Match <regexp> on the original E.164 number
-// # * 2. Apply rewrite rule <string>
-// # * \n in <string> is replaced with group number 'n' in <regexp>
-// #
-//
-// # Match beginning
-// m_begin = "^" any* $inc_index;
-//
-// # Match end
-// m_end = "$";
-//
-// # Math any character
-// m_any_c = ".";
-//
-// # Match any number of any character
-// m_any_string = ".*" | ".+";
-//
-// # Grouping
-// group_n = "\\" digit+;
-// group_begin = "(" >create_group;
-// group_end = ")" >add_group;
-// group = group_begin<: any* :>group_end;
-//
-// # Escaped char
-// escaped_char = "\\" alpha;
-//
-// regexp =
-// m_begin<:
-// m_any_c | m_any_string | group
-// :>m_end;
-//
-// string = any*;
-//
-// main := "!"<: regexp :> "!" <: string :> "!";
-//}%%
-//
-///**
-//* Apply @a regexp to @a e164num.
-//* @param e164num Original E.164 number supplied by the user (only digits or '+' are accepted).
-//* @param regexp A <character-string> containing a substitution expression that is
-//* applied to the original string held by the client in order to
-//* construct the next domain name to lookup. Example: "!^.*$!sip:bob@doubango.org!i".
-//* @retval The final Internet address. It's up to the caller to free the string.
-//*/
-//char* tnet_dns_regex_parse(const char* e164num, const char* regexp)
-//{
-// char* ret = tsk_null;
-// groups_L_t* groups = tsk_list_create();
-// group_t* curr_group = tsk_null;
-// tsk_size_t index = 0;
-// int group_id = 0;
-//
-// // Ragel
-// int cs = 0;
-// const char *p = regexp;
-// const char *pe;
-// const char *eof;
-//
-// %%write data;
-//
-// if(!e164num){
-// goto bail;
-// }
-//
-// if(!regexp){
-// ret = tsk_strdup(e164num);
-// goto bail;
-// }
-//
-// pe = p + tsk_strlen(regexp);
-// eof = pe;
-//
-// %%write init;
-// %%write exec;
-//
-// if( cs < %%{ write first_final; }%% ){
-// TSK_DEBUG_ERROR("regexp substitition failed.");
-// TSK_FREE(ret);
-// }
-//
-//bail:
-// TSK_OBJECT_SAFE_FREE(groups);
-// if(curr_group){
-// TSK_OBJECT_SAFE_FREE(curr_group);
-// }
-//
-// return ret;
-//}
-//
-////=================================================================================================
-//// String object definition
-////
-//static tsk_object_t* group_create(tsk_object_t * self, va_list * app)
-//{
-// group_t *g = self;
-// if(g){
-// g->id = va_arg(*app, int);
-// }
-// return self;
-//}
-//
-//static tsk_object_t* group_destroy(tsk_object_t * self)
-//{
-// group_t *g = self;
-// if(g){
-// }
-//
-// return self;
-//}
-//
-//static int group_cmp(const tsk_object_t *_g1, const tsk_object_t *_g2)
-//{
-// const group_t *g1 = _g1;
-// const group_t *g2 = _g2;
-//
-// if(g1 && g22){
-// return (g1->id - g2->id);
-// }
-// else if(!g1 && !g2) return 0;
-// else return -1;
-//}
-//
-//static const tsk_object_def_t group_def_s =
-//{
-// sizeof(group_t),
-// group_create,
-// group_destroy,
-// group_cmp,
-//};
-//const tsk_object_def_t *group_def_t = &group_def_s;
diff --git a/branches/1.0/tinyNET/ragel/tnet_dns_resolvconf.rl b/branches/1.0/tinyNET/ragel/tnet_dns_resolvconf.rl
deleted file mode 100644
index 3d8d064..0000000
--- a/branches/1.0/tinyNET/ragel/tnet_dns_resolvconf.rl
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_resolvconf.c
- * @brief Parser for "/etc/resolv.conf" file to retrive DNS servers.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_resolvconf.h"
-
-#include "tnet_utils.h"
-
-#include "dns/tnet_dns.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_ragel_state.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-
-/* === Ragel state machine === */
-%%{
- machine tdns_machine_resolvconf;
-
- action tag{
- tag_start = p;
- }
-
- action add_dns{
- int len = (int)(p - tag_start);
- if(len && len<=sizeof(ip)){
- tnet_address_t *address;
- memset(ip, '\0', sizeof(ip));
- memcpy(ip, tag_start, len);
-
- address = tnet_address_create(ip);
- address->family = tnet_get_family(ip, TNET_DNS_SERVER_PORT_DEFAULT);
- address->dnsserver = 1;
- tsk_list_push_ascending_data(servers, (void**)&address);
- }
- }
-
- SP = " ";
- LF = "\n";
- CR = "\r";
- CRLF = CR LF;
- ENDL = (LF | CR | CRLF);
-
- o_name = any+;
- o_value = any+;
-
- COMMENT = SP*<: "#" any*;
- OPTION_ANY = SP*<: o_name :>SP+<: o_value :>SP*;
- OPTION_DNS = SP*<: "nameserver"i :>SP+<: o_value>tag %add_dns :>SP*;
- LINE = (OPTION_DNS)@100 | (OPTION_ANY)@0 | (COMMENT)@50;
-
- main := ((LINE :>ENDL) | ENDL)* %3 any* %2;
-}%%
-
-/** Gets list of DNS servers from a conf file.
-* @param path Path of the conf file from which to retrieve the DNS servers.
-* should be @a "/etc/resolv.conf". You can adjust the value by modifying @ref TNET_RESOLV_CONF_PATH.<br>
-* If you are using <b>Android</b> and the resolv.conf file is missing, then run the following line in a command window: <br>
-* <i>ln -s /private/var/run/resolv.conf /etc/resolv.conf</i><br> If this fails, then try to manually add the file.
-* @retval List of DNS servers.
-*/
-tnet_addresses_L_t * tnet_dns_resolvconf_parse(const char* path)
-{
- tnet_addresses_L_t* servers = tsk_null;
- tnet_ip_t ip;
- const char* fullpath = path;
- const char* tag_start;
- FILE* fd;
- char buf[4092];
-
- // Ragel
- int cs = 0;
- const char *p;
- const char *pe;
- const char *eof;
-
- %%write data;
-
- if(tsk_strnullORempty(fullpath)){
- fullpath = TNET_RESOLV_CONF_PATH;
- }
-
- /* Open the file and read all data */
- if((fd = fopen(fullpath, "r"))){
- int len = fread(buf, sizeof(uint8_t), sizeof(buf)-2, fd);
- p = &buf[0];
- pe = p + len + 1/*hack*/;
- eof = pe;
- fclose(fd);
-
- buf[len] = '\n'; // hack to have perfect lines
-
- servers = tsk_list_create();
- }
- else{
-#if ANDROID
- TSK_DEBUG_INFO("Failed to open [%s]. But don't panic, we have detected that you are using Google Android System.\n"
- "You should look at the Progammer's Guide for more information.\n If you are not using DNS functions, don't worry about this warning.",
- fullpath);
-#else
- TSK_DEBUG_ERROR("Failed to open %s.", fullpath);
-#endif
- goto bail;
- }
-
- %%write init;
- %%write exec;
-
- if( cs < %%{ write first_final; }%% ){
- TSK_DEBUG_ERROR("Failed to parse %s.", fullpath);
- TSK_OBJECT_SAFE_FREE(servers);
- }
-
-bail:
- return servers;
-}
-
-
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp.c b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp.c
deleted file mode 100644
index 8e7dbe6..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp.c
- * @brief DHCP/BOOTP (RFC 2131 - Dynamic Host Configuration Protocol) utilities function for P-CSCF discovery(RFC 3319 and 3361).
- * Also implement: RFC 3315, 3118, 3319, 3825 (Geoconf), 4676 (Civic Addresses Configuration Information) ...
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp.h"
-
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_thread.h"
-#include "tsk_memory.h"
-#include "tsk_time.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-// Useful link: http://support.microsoft.com/?scid=kb%3Ben-us%3B169289&x=21&y=14
-// Another one: http://www.iana.org/assignments/bootp-dhcp-parameters/
-// Another one: http://www.slideshare.net/raini/DHCP-Presentation-v102
-// RFC 3319 Dynamic Host Configuration Protocol (DHCPv6) Options for Session Initiation Protocol (SIP) Servers
-// RFC 3361 Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for Session Initiation Protocol (SIP) Servers
-
-/**@defgroup tnet_dhcp_group DHCPv4/BOOTP (RFC 2131) implementation.
-*/
-
-/**@ingroup tnet_dhcp_group
-* Creates new DHCPv4 context.
-*/
-tnet_dhcp_ctx_t* tnet_dhcp_ctx_create()
-{
- return tsk_object_new(tnet_dhcp_ctx_def_t);
-}
-
-/**@ingroup tnet_dhcp_group
-* Creates new DHCPv4 parameters.
-*/
-tnet_dhcp_params_t* tnet_dhcp_params_create()
-{
- return tsk_object_new(tnet_dhcp_params_def_t);
-}
-
-/* FIXME: USE retransmission mech (*2*2...)
-*/
-/**@ingroup tnet_dhcp_group
-*/
-tnet_dhcp_reply_t* tnet_dhcp_send_request(tnet_dhcp_ctx_t* ctx, tnet_dhcp_request_t* request)
-{
- tsk_buffer_t *output;
- tnet_dhcp_reply_t* reply = tsk_null;
- int ret;
- struct timeval tv;
- fd_set set;
- uint64_t timeout = 0;
- tsk_list_item_t *item;
- const tnet_interface_t *iface;
-
- tnet_socket_t *localsocket4 = tsk_null;
- struct sockaddr_storage server;
-
- if(!ctx || !request){
- goto bail;
- }
-
- localsocket4 = tnet_socket_create(TNET_SOCKET_HOST_ANY, ctx->port_client, tnet_socket_type_udp_ipv4);
- if(!TNET_SOCKET_IS_VALID(localsocket4)){
- TSK_DEBUG_ERROR("Failed to create/bind DHCP client socket.");
- goto bail;
- }
-
- /* Always wait for 200ms before retransmission */
- tv.tv_sec = 0;
- tv.tv_usec = (200 * 1000);
-
- if(tnet_sockaddr_init("255.255.255.255", ctx->server_port, tnet_socket_type_udp_ipv4, &server)){
- TNET_PRINT_LAST_ERROR("Failed to initialize the DHCP server address");
- goto bail;
- }
-
- /* ENABLE BROADCASTING */
- {
-#if defined(SOLARIS)
- char yes = '1';
-#else
- int yes = 1;
-#endif
- if(setsockopt(localsocket4->fd, SOL_SOCKET, SO_BROADCAST, (char*)&yes, sizeof(int))){
- TNET_PRINT_LAST_ERROR("Failed to enable broadcast option");
- goto bail;
- }
- }
-
- /* Set timeout */
- timeout = tsk_time_epoch() + ctx->timeout;
-
- do
- {
- /* RFC 2131 - 3.6 Use of DHCP in clients with multiple interfaces
- A client with multiple network interfaces must use DHCP through each
- interface independently to obtain configuration information
- parameters for those separate interfaces.
- */
-
- tsk_list_foreach(item, ctx->interfaces){
- iface = item->data;
-
- /* Set FD */
- FD_ZERO(&set);
- FD_SET(localsocket4->fd, &set);
-
- /* ciaddr */
- if(request->type == dhcp_type_inform){
- struct sockaddr_storage ss;
- if(!tnet_get_sockaddr(localsocket4->fd, &ss)){
- uint32_t addr = tnet_htonl_2(&((struct sockaddr_in*)&ss)->sin_addr);
- memcpy(&request->ciaddr, &addr, 4);
- }
- }
-
- /* chaddr */
- memset(request->chaddr, 0, sizeof(request->chaddr));
- request->hlen = iface->mac_address_length > sizeof(request->chaddr) ? sizeof(request->chaddr) : iface->mac_address_length;
- memcpy(request->chaddr, iface->mac_address, request->hlen);
-
- /* Serialize and send to the server. */
- if(!(output = tnet_dhcp_message_serialize(ctx, request))){
- TSK_DEBUG_ERROR("Failed to serialize the DHCP message.");
- goto next_iface;
- }
- /* Send the request to the DHCP server */
- if((ret =tnet_sockfd_sendto(localsocket4->fd, (const struct sockaddr*)&server, output->data, output->size))<0){
- TNET_PRINT_LAST_ERROR("Failed to send DHCP request");
-
- tsk_thread_sleep(150); // wait 150ms before trying the next iface.
- goto next_iface;
- }
- /* wait for response */
- if((ret = select(localsocket4->fd+1, &set, NULL, NULL, &tv))<0){ /* Error */
- TNET_PRINT_LAST_ERROR("select have failed.");
- tsk_thread_sleep(150); // wait 150ms before trying the next iface.
- goto next_iface;
- }
- else if(ret == 0)
- { /* timeout ==> do nothing */
- }
- else
- { /* there is data to read */
- tsk_size_t len = 0;
- void* data = tsk_null;
-
- /* Check how how many bytes are pending */
- if((ret = tnet_ioctlt(localsocket4->fd, FIONREAD, &len))<0){
- goto next_iface;
- }
-
- /* Receive pending data */
- data = tsk_calloc(len, sizeof(uint8_t));
- if((ret = tnet_sockfd_recv(localsocket4->fd, data, len, 0))<0){
- TSK_FREE(data);
-
- TNET_PRINT_LAST_ERROR("Failed to receive DHCP dgrams.");
- goto next_iface;
- }
-
- /* Parse the incoming response. */
- reply = tnet_dhcp_message_deserialize(ctx, data, (tsk_size_t)ret);
- TSK_FREE(data);
-
- if(reply)
- { /* response successfuly parsed */
- if(request->xid != reply->xid)
- { /* Not same transaction id ==> continue*/
- TSK_OBJECT_SAFE_FREE(reply);
- }
- }
- }
-
- next_iface:
- TSK_OBJECT_SAFE_FREE(output);
- if(reply){
- goto bail;
- }
- }
- //break;//FIXME
- }
- while(timeout > tsk_time_epoch());
-
-bail:
- TSK_OBJECT_SAFE_FREE(localsocket4);
-
- return reply;
-}
-
-/**@ingroup tnet_dhcp_group
-*/
-tnet_dhcp_reply_t* tnet_dhcp_query(tnet_dhcp_ctx_t* ctx, tnet_dhcp_message_type_t type, tnet_dhcp_params_t* params)
-{
- tnet_dhcp_reply_t* reply = tsk_null;
- tnet_dhcp_request_t* request = tnet_dhcp_request_create();
-
- if(!ctx || !params || !request){
- goto bail;
- }
-
- request->type = type;
- tnet_dhcp_message_add_codes(request, params->codes, params->codes_count);
-
- reply = tnet_dhcp_send_request(ctx, request);
-
-bail:
- TSK_OBJECT_SAFE_FREE(request);
-
- return reply;
-}
-
-/**@ingroup tnet_dhcp_group
-*/
-int tnet_dhcp_params_add_code(tnet_dhcp_params_t* params, tnet_dhcp_option_code_t code)
-{
- if(params){
- if(params->codes_count < TNET_DHCP_MAX_CODES){
- unsigned i;
- for(i=0; i<params->codes_count; i++){
- if(params->codes[i] == code){
- return -3;
- }
- }
- params->codes[params->codes_count++] = code;
- }
- else return -2;
- }
- return -1;
-}
-
-
-
-//=================================================================================================
-// [[DHCP CONTEXT]] object definition
-//
-static tsk_object_t* tnet_dhcp_ctx_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_ctx_t *ctx = self;
- if(ctx){
- tnet_host_t host;
-
- ctx->vendor_id = tsk_strdup(TNET_DHCP_VENDOR_ID_DEFAULT);
- if(!tnet_gethostname(&host)){
- ctx->hostname = tsk_strndup(host, tsk_strlen(host));
- }
- ctx->timeout = TNET_DHCP_TIMEOUT_DEFAULT;
- ctx->max_msg_size = TNET_DHCP_MAX_MSG_SIZE;
- ctx->port_client = TNET_DHCP_CLIENT_PORT;
- ctx->server_port = TNET_DHCP_SERVER_PORT;
- ctx->interfaces = tnet_get_interfaces();
-
- if(!ctx->interfaces || TSK_LIST_IS_EMPTY(ctx->interfaces)){
- TSK_DEBUG_ERROR("Failed to retrieve network interfaces.");
- }
-
- tsk_safeobj_init(ctx);
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_ctx_dtor(tsk_object_t * self)
-{
- tnet_dhcp_ctx_t *ctx = self;
- if(ctx){
- tsk_safeobj_deinit(ctx);
-
- TSK_FREE(ctx->vendor_id);
- TSK_FREE(ctx->hostname);
-
- TSK_OBJECT_SAFE_FREE(ctx->interfaces);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_ctx_def_s =
-{
- sizeof(tnet_dhcp_ctx_t),
- tnet_dhcp_ctx_ctor,
- tnet_dhcp_ctx_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_ctx_def_t = &tnet_dhcp_ctx_def_s;
-
-//=================================================================================================
-// [[DHCP PARAMS]] object definition
-//
-static tsk_object_t* tnet_dhcp_params_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_params_t *params = self;
- if(params){
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_params_dtor(tsk_object_t * self)
-{
- tnet_dhcp_params_t *params = self;
- if(params){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_params_def_s =
-{
- sizeof(tnet_dhcp_params_t),
- tnet_dhcp_params_ctor,
- tnet_dhcp_params_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_params_def_t = &tnet_dhcp_params_def_s;
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp.h b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp.h
deleted file mode 100644
index 6b306c5..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp.h
- * @brief DHCP (RFC 2131 - Dynamic Host Configuration Protocol) utilities function for P-CSCF discovery(RFC 3319 and 3361)
- * Also implement: RFC 3315, 3118, 3319, 3825 (Geoconf), 4676 (Civic Addresses Configuration Information)...
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DHCP_H
-#define TNET_DHCP_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dhcp_message.h"
-
-#include "tnet_utils.h"
-
-#include "tsk_object.h"
-#include "tsk_safeobj.h"
-
-TNET_BEGIN_DECLS
-
-/**@ingroup tnet_dhcp_group
-* Default timeout (in milliseconds) value for DHCP requests.
-*/
-#define TNET_DHCP_TIMEOUT_DEFAULT 2000
-
-/**@ingroup tnet_dhcp_group
-* Local port(client) to bind to for incoming DHCP messages as per RFC 2131 subclause 4.1. */
-#define TNET_DHCP_CLIENT_PORT 68
-/**@ingroup tnet_dhcp_group
-* Destination port(Server) for outgoing DHCP messages as per RFC 2131 subclause 4.1. */
-#define TNET_DHCP_SERVER_PORT 67
-
-/**@ingroup tnet_dhcp_group
-* @def TNET_DHCP_VENDOR_ID_DEFAULT
-*/
-/**@ingroup tnet_dhcp_group
-* @def TNET_DHCP_MAX_CODES
-*/
-/**@ingroup tnet_dhcp_group
-* @def TNET_DHCP_MAX_MSG_SIZE
-*/
-#define TNET_DHCP_VENDOR_ID_DEFAULT "doubango/v0.0.0"
-#define TNET_DHCP_MAX_CODES 20
-#define TNET_DHCP_MAX_MSG_SIZE 1500
-
-/**@ingroup tnet_dhcp_group
-* Parameter Request List (55)
-*/
-typedef struct tnet_dhcp_params_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_dhcp_option_code_t codes[TNET_DHCP_MAX_CODES];
- unsigned codes_count;
-}
-tnet_dhcp_params_t;
-
-/**@ingroup tnet_dhcp_group
-*/
-typedef struct tnet_dhcp_ctx_s
-{
- TSK_DECLARE_OBJECT;
-
- char* vendor_id;
- char* hostname;
- uint16_t max_msg_size; /**< Option code 57. */
-
- uint64_t timeout;
-
- tnet_port_t port_client; /**< Local port to bind to for incloming DHCP messages. Default: 68 */
- tnet_port_t server_port; /**< Destination port for outgoing DHCP messages. Default: 64 */
- tnet_interfaces_L_t *interfaces;
-
- TSK_DECLARE_SAFEOBJ;
-}
-tnet_dhcp_ctx_t;
-
-
-TINYNET_API tnet_dhcp_reply_t* tnet_dhcp_query(tnet_dhcp_ctx_t* ctx, tnet_dhcp_message_type_t type, tnet_dhcp_params_t* params);
-#define tnet_dhcp_query_discover(ctx, params) tnet_dhcp_query(ctx, dhcp_type_discover, params)
-#define tnet_dhcp_query_request(ctx, params) tnet_dhcp_query(ctx, dhcp_type_request, params)
-#define tnet_dhcp_query_decline(ctx, params) tnet_dhcp_query(ctx, dhcp_type_decline, params)
-#define tnet_dhcp_query_release(ctx, params) tnet_dhcp_query(ctx, dhcp_type_release, params)
-#define tnet_dhcp_query_inform(ctx, params) tnet_dhcp_query(ctx, dhcp_type_inform, params)
-
-TINYNET_API int tnet_dhcp_params_add_code(tnet_dhcp_params_t* params, tnet_dhcp_option_code_t code);
-
-
-TINYNET_API tnet_dhcp_ctx_t* tnet_dhcp_ctx_create();
-TINYNET_API tnet_dhcp_params_t* tnet_dhcp_params_create();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_ctx_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_params_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP_H */
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.c b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.c
deleted file mode 100644
index e4eff3b..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp_message.c
- * @brief DHCP Message as per RFC 2131 subclause 2.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp_message.h"
-#include "tnet_dhcp.h"
-
-#include "../tnet_utils.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_time.h"
-#include "tsk_memory.h"
-#include "tsk_string.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-tnet_dhcp_message_t* tnet_dhcp_message_create(tnet_dhcp_message_op_t opcode)
-{
- return tsk_object_new(tnet_dhcp_message_def_t, opcode);
-}
-
-tnet_dhcp_request_t* tnet_dhcp_request_create()
-{
- return tnet_dhcp_message_create(dhcp_op_bootrequest);
-}
-
-tnet_dhcp_message_t* tnet_dhcp_reply_create()
-{
- return tnet_dhcp_message_create(dhcp_op_bootreply);
-}
-
-tsk_buffer_t* tnet_dhcp_message_serialize(const tnet_dhcp_ctx_t *ctx, const tnet_dhcp_message_t *message)
-{
- tsk_buffer_t* output = 0;
- uint8_t _1byte;
- uint16_t _2bytes;
- uint32_t _4bytes;
-
- /* Check message validity */
- if(!message){
- goto bail;
- }
-
- output = tsk_buffer_create_null();
-
- /*== OP HTYPE HLEN HOPS */
- _4bytes = (((uint32_t)(message->op)) << 24) |
- (((uint32_t)(message->htype)) << 16) |
- (((uint16_t)(message->hlen)) << 8) | message->hops;
- _4bytes = tnet_ntohl(_4bytes);
- tsk_buffer_append(output, &(_4bytes), 4);
-
- /*== XID */
- _4bytes = tnet_ntohl(message->xid);
- tsk_buffer_append(output, &(_4bytes), 4);
- /*== SECS */
- _2bytes = tnet_ntohs(message->secs);
- tsk_buffer_append(output, &(_2bytes), 2);
- /*== FLAGS */
- _2bytes = tnet_ntohs(message->flags);
- tsk_buffer_append(output, &(_2bytes), 2);
- /*== CIADDR */
- _4bytes = tnet_ntohl(message->ciaddr);
- tsk_buffer_append(output, &(_4bytes), 4);
- /*== YIADDR */
- _4bytes = tnet_ntohl(message->yiaddr);
- tsk_buffer_append(output, &(_4bytes), 4);
- /*== SIADDR */
- _4bytes = tnet_ntohl(message->siaddr);
- tsk_buffer_append(output, &(_4bytes), 4);
- /*== GIADDR */
- _4bytes = tnet_ntohl(message->giaddr);
- tsk_buffer_append(output, &(_4bytes), 4);
- /*== CHADDR */
- tsk_buffer_append(output, message->chaddr, sizeof(message->chaddr));
- /*== sname (unused) */
- tsk_buffer_append(output, message->sname, sizeof(message->sname));
- /*== file (unused) */
- tsk_buffer_append(output, message->file, sizeof(message->file));
- /*== Magic Cookie */
- _4bytes = tnet_ntohl(TNET_DHCP_MAGIC_COOKIE);
- tsk_buffer_append(output, &(_4bytes), 4);
-
- /*== Message Type (option 53)
- */
- tnet_dhcp_option_serializeex(dhcp_code_DHCP_Msg_Type, 1, &message->type, output);
-
- /*== Client Identifier (option 61) ==> RFC 2132 - 9.14. Client-identifier
- Code Len Type Client-Identifier
- +-----+-----+-----+-----+-----+---
- | 61 | n | t1 | i1 | i2 | ...
- +-----+-----+-----+-----+-----+---
- */
- if(message->hlen){
- uint8_t client_id[17]; // 16 /*sizeof(chaddr)*/+ 1/*htype*/
- /*if(client_id)*/{
- client_id[0] = message->htype;
- memcpy(&client_id[1], message->chaddr, message->hlen);
- tnet_dhcp_option_serializeex(dhcp_code_Client_Id, (message->hlen+1), client_id, output);
- }
- }
- /*== Host name(10) ==> RFC 2132 - 3.14. Host Name Option
- Code Len Host Name
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- | 12 | n | h1 | h2 | h3 | h4 | h5 | h6 | ...
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- */
- if(TNET_DHCP_MESSAGE_IS_REQUEST(message) && ctx->hostname){
- tnet_dhcp_option_serializeex(dhcp_code_Hostname, tsk_strlen(ctx->hostname), ctx->hostname, output);
- }
- /*== Vendor classId(60) ==> RFC 2132 - 9.13. Vendor class identifier
- Code Len Vendor class Identifier
- +-----+-----+-----+-----+---
- | 60 | n | i1 | i2 | ...
- +-----+-----+-----+-----+---
- */
- if(TNET_DHCP_MESSAGE_IS_REQUEST(message) && ctx->vendor_id){
- tnet_dhcp_option_serializeex(dhcp_code_Class_Id, tsk_strlen(ctx->vendor_id), ctx->vendor_id, output);
- }
-
- /*== RFC 2132 - 9.10. Maximum DHCP Message Size (57)
- Code Len Length
- +-----+-----+-----+-----+
- | 57 | 2 | l1 | l2 |
- +-----+-----+-----+-----+
- */
- if(TNET_DHCP_MESSAGE_IS_REQUEST(message) && ctx->max_msg_size){
- _2bytes = tnet_ntohs(ctx->max_msg_size);
- tnet_dhcp_option_serializeex(dhcp_code_DHCP_Max_Msg_Size, 2, &_2bytes, output);
- }
-
- /*== DHCP Options
- */
- {
- tsk_list_item_t *item;
- tnet_dhcp_option_t* option;
- tsk_list_foreach(item, message->options)
- {
- option = (tnet_dhcp_option_t*)item->data;
- if(tnet_dhcp_option_serialize(option, output)){
- TSK_DEBUG_WARN("Failed to serialize DHCP OPTION (%u)", option->code);
- }
- }
- }
-
- /* RFC 2131 - 4.1 Constructing and sending DHCP messages
- The last option must always be the 'end' option.
- */
- _1byte = dhcp_code_End;
- tsk_buffer_append(output, &(_1byte), 1);
-
-bail:
- return output;
-}
-
-tnet_dhcp_message_t* tnet_dhcp_message_deserialize(const struct tnet_dhcp_ctx_s *ctx, const uint8_t *data, tsk_size_t size)
-{
- tnet_dhcp_message_t *message = 0;
- uint8_t *dataPtr, *dataEnd, *dataStart;
-
- if(!data || !size)
- {
- goto bail;
- }
-
- if(size < TNET_DHCP_MESSAGE_MIN_SIZE){
- TSK_DEBUG_ERROR("DHCP message too short.");
- goto bail;
- }
-
- if(!(message = tnet_dhcp_reply_create())){ /* If REQUEST OP will be overridedden */
- TSK_DEBUG_ERROR("Failed to create new DHCP message.");
- goto bail;
- }
-
- dataPtr = (uint8_t*)data;
- dataStart = dataPtr;
- dataEnd = (dataStart + size);
-
- /*== op (1)*/
- message->op = *(dataPtr++);
- /*== htype (1) */
- message->htype = *(dataPtr++);
- /*== hlen (1) */
- message->hlen = *(dataPtr++);
- /*== htype (1) */
- message->hops = *(dataPtr++);
- /*== xid (4) */
- message->xid= tnet_htonl_2(dataPtr);
- dataPtr += 4;
- /*== secs (2) */
- message->secs = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
- /*== flags (2) */
- message->flags = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
- /*== ciaddr (4) */
- message->ciaddr= tnet_htonl_2(dataPtr);
- dataPtr += 4;
- /*== yiaddr (4) */
- message->yiaddr= tnet_htonl_2(dataPtr);
- dataPtr += 4;
- /*== siaddr (4) */
- message->siaddr= tnet_htonl_2(dataPtr);
- dataPtr += 4;
- /*== giaddr (4) */
- message->giaddr= tnet_htonl_2(dataPtr);
- dataPtr += 4;
- /*== chaddr (16[max]) */
- memcpy(message->chaddr, dataPtr, message->hlen>16 ? 16 : message->hlen);
- dataPtr += 16;
- /*== sname (64) */
- memcpy(message->sname, dataPtr, 64);
- dataPtr += 64;
- /*== file (128) */
- memcpy(message->file, dataPtr, 128);
- dataPtr += 128;
- /*== Magic Cookie (4) */
- if(tnet_htonl_2(dataPtr) != TNET_DHCP_MAGIC_COOKIE){
- TSK_DEBUG_ERROR("Invalid DHCP magic cookie.");
- // Do not exit ==> continue parsing.
- }
- dataPtr += 4;
-
- /*== options (variable) */
- while(dataPtr<dataEnd && *dataPtr!=dhcp_code_End)
- {
- tnet_dhcp_option_t* option = tnet_dhcp_option_deserialize(dataPtr, (dataEnd-dataPtr));
- if(option && option->value){
-
- if(option->code == dhcp_code_DHCP_Msg_Type){
- message->type = (tnet_dhcp_message_type_t)*TSK_BUFFER_TO_U8(option->value);
- }
-
- dataPtr += option->value->size + 2/*Code Len*/;
- tsk_list_push_back_data(message->options, (void**)&option);
- }
- else break;
- }
-
-bail:
- return message;
-}
-
-
-const tnet_dhcp_option_t* tnet_dhcp_message_find_option(const tnet_dhcp_message_t *message, tnet_dhcp_option_code_t code)
-{
- tsk_list_item_t *item;
-
- if(!message){
- goto bail;
- }
-
- tsk_list_foreach(item, message->options)
- {
- if(((tnet_dhcp_option_t*)item->data)->code == code){
- return ((tnet_dhcp_option_t*)item->data);
- }
- }
-
-bail:
- return 0;
-}
-
-int tnet_dhcp_message_add_codes(tnet_dhcp_message_t *self, tnet_dhcp_option_code_t codes[], unsigned codes_count)
-{
- int ret = -1;
-
- if(!self){
- goto bail;
- }
- if(codes_count){
- unsigned i;
-
- tnet_dhcp_option_paramslist_t* option = (tnet_dhcp_option_paramslist_t*)tnet_dhcp_message_find_option(self, dhcp_code_Parameter_List);
- if(!option){
- tnet_dhcp_option_paramslist_t *option_paramslist = tnet_dhcp_option_paramslist_create();
- option = option_paramslist;
- tsk_list_push_back_data(self->options, (void**)&option_paramslist);
- }
-
- for(i=0; i<codes_count; i++){
- if((ret = tnet_dhcp_option_paramslist_add_code(option, codes[i]))){
- break;
- }
- }
- }
-
-bail:
- return ret;
-}
-
-
-//=================================================================================================
-// [[DHCP MESSAGE]] object definition
-//
-static tsk_object_t* tnet_dhcp_message_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_message_t *message = self;
- if(message){
- static uint32_t __dhcpmessage_unique_xid = 0;//(uint32_t)tsk_time_epoch();
-
- message->op = va_arg(*app, tnet_dhcp_message_op_t);
- message->htype = tnet_htype_Ethernet_10Mb;
- message->hlen = 0x06;
-
- message->xid = ++(__dhcpmessage_unique_xid);
- message->options = tsk_list_create();
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_message_dtor(tsk_object_t * self)
-{
- tnet_dhcp_message_t *message = self;
- if(message){
- TSK_OBJECT_SAFE_FREE(message->options);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_message_def_s =
-{
- sizeof(tnet_dhcp_message_t),
- tnet_dhcp_message_ctor,
- tnet_dhcp_message_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_message_def_t = &tnet_dhcp_message_def_s;
-
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.h b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.h
deleted file mode 100644
index 4101e9b..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_message.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp_message.h
- * @brief DHCP Message as per RFC 2131 subclause 2.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DHCP_MESSAGE_H
-#define TNET_DHCP_MESSAGE_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dhcp_option.h"
-#include "tnet_hardwares.h"
-
-#include "tsk_buffer.h"
-
-TNET_BEGIN_DECLS
-
-struct tnet_dhcp_ctx_s;
-
-#define TNET_DHCP_MESSAGE_IS_REQUEST(self) ((self) && ((self)->op==dhcp_op_bootrequest))
-#define TNET_DHCP_MESSAGE_IS_REPLY(self) ((self) && ((self)->op==dhcp_op_bootreply))
-
-#define TNET_DHCP_MAGIC_COOKIE 0x63825363 /**< DHCP magic cookie (99, 130, 83 and 99 in decimal).*/
-
-#define TNET_DHCP_MESSAGE_MIN_SIZE 223 /* Is it rigth? */
-
-/** List of all supported DHCP message (see RFC 2131).
-*/
-typedef enum tnet_dhcp_message_type_e
-{
- /**< DHCPDISCOVER - Client broadcast to locate available servers.
- */
- dhcp_type_discover = 1,
-
- /**< DHCPOFFER - Server to client in response to DHCPDISCOVER with
- offer of configuration parameters.
- */
- dhcp_type_offer = 2,
-
- /**< DHCPREQUEST - Client message to servers either (a) requesting
- offered parameters from one server and implicitly
- declining offers from all others, (b) confirming
- correctness of previously allocated address after,
- e.g., system reboot, or (c) extending the lease on a
- particular network address.
- */
- dhcp_type_request = 3,
-
- /**< DHCPDECLINE - Client to server indicating network address is already
- in use.
- */
- dhcp_type_decline = 4,
-
- /**< DHCPACK - Server to client with configuration parameters,
- including committed network address.
- */
- dhcp_type_ack = 5,
-
- /**< DHCPNAK - Server to client indicating client's notion of network
- address is incorrect (e.g., client has moved to new
- subnet) or client's lease as expired
- */
- dhcp_type_nack = 6,
-
- /**< DHCPRELEASE - Client to server relinquishing network address and
- cancelling remaining lease.
- */
- dhcp_type_release = 7,
-
- /**< DHCPINFORM - Client to server, asking only for local configuration
- parameters; client already has externally configured
- network address.
- */
- dhcp_type_inform = 8,
-}
-tnet_dhcp_message_type_t;
-
-/** DHCP message OP code / message type.
-*/
-typedef enum tnet_dhcp_message_op_e
-{
- dhcp_op_bootrequest = 1,
- dhcp_op_bootreply = 2
-}
-tnet_dhcp_message_op_t;
-
-/** BOOTP/DHCP message as per RFC 2131 subclause 2.
-*/
-typedef struct tnet_dhcp_message_s
-{
- TSK_DECLARE_OBJECT;
-
- /**< DHCP message type. Mandatory.
- */
- tnet_dhcp_message_type_t type;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | op (1) | htype (1) | hlen (1) | hops (1) |
- +---------------+---------------+---------------+---------------+
- | xid (4) |
- +-------------------------------+-------------------------------+
- | secs (2) | flags (2) |
- +-------------------------------+-------------------------------+
- | ciaddr (4) |
- +---------------------------------------------------------------+
- | yiaddr (4) |
- +---------------------------------------------------------------+
- | siaddr (4) |
- +---------------------------------------------------------------+
- | giaddr (4) |
- +---------------------------------------------------------------+
- | |
- | chaddr (16) |
- | |
- | |
- +---------------------------------------------------------------+
- | |
- | sname (64) |
- +---------------------------------------------------------------+
- | |
- | file (128) |
- +---------------------------------------------------------------+
- | |
- | options (variable) |
- +---------------------------------------------------------------+
- */
-
- /**< Message op code / message type (1-byte).
- 1 = BOOTREQUEST, 2 = BOOTREPLY
- */
- tnet_dhcp_message_op_t op;
- /**< Hardware address type, see ARP section in "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet.
- For more information see RFC 1340.
- */
- tnet_hardware_type_t htype;
- /**< Hardware address length (e.g. '6' for 10mb ethernet). tsk_strlen(chaddr).
- */
- uint8_t hlen;
- /**< Client sets to zero, optionally used by relay agents when booting via a relay agent.
- */
- uint8_t hops;
- /**< Transaction ID, a random number chosen by the client, used by the client
- and server to associate messages and responses between a client and a server.
- */
- uint32_t xid;
- /**< Filled in by client, seconds elapsed since client began address acquisition or renewal process.
- */
- uint16_t secs;
- /**< Flags (see figure 2)
- */
- uint16_t flags;
- /**< Client IP address; only filled in if client is in BOUND, RENEW or REBINDING
- state and can respond to ARP requests.
- */
- uint32_t ciaddr;
- /**< 'your' (client) IP address.
- */
- uint32_t yiaddr;
- /**< IP address of next server to use in bootstrap;
- returned in DHCPOFFER, DHCPACK by server.
- */
- uint32_t siaddr;
- /**< Relay agent IP address, used in booting via a relay agent.
- */
- uint32_t giaddr;
- /**< Client hardware address.
- */
- uint8_t chaddr[16];
- /**< Optional server host name, null terminated string.
- */
- uint8_t sname[64];
- /**<Boot file name, null terminated string; "generic" name or null in DHCPDISCOVER,
- fully qualifieddirectory-path name in DHCPOFFER.
- */
- uint8_t file[128];
- /**Optional parameters field. See the options documents for a list of defined options.
- For more information please refer to RFC 2132, 1497 and 1533.
- */
- tnet_dhcp_options_L_t *options;
-}
-tnet_dhcp_message_t;
-
-typedef tsk_list_t tnet_dhcp_messages_L_t;
-typedef tnet_dhcp_message_t tnet_dhcp_request_t; /**< BOOTREQUEST message. */
-typedef tnet_dhcp_message_t tnet_dhcp_reply_t; /**< BOOTREPLY message. */
-
-tsk_buffer_t* tnet_dhcp_message_serialize(const struct tnet_dhcp_ctx_s *ctx, const tnet_dhcp_message_t *self);
-tnet_dhcp_message_t* tnet_dhcp_message_deserialize(const struct tnet_dhcp_ctx_s *ctx, const uint8_t *data, tsk_size_t size);
-const tnet_dhcp_option_t* tnet_dhcp_message_find_option(const tnet_dhcp_message_t *self, tnet_dhcp_option_code_t code);
-int tnet_dhcp_message_add_codes(tnet_dhcp_message_t *self, tnet_dhcp_option_code_t codes[], unsigned codes_count);
-
-TINYNET_API tnet_dhcp_message_t* tnet_dhcp_message_create(tnet_dhcp_message_op_t opcode);
-TINYNET_API tnet_dhcp_request_t* tnet_dhcp_request_create();
-TINYNET_API tnet_dhcp_message_t* tnet_dhcp_reply_create();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_message_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP_MESSAGE_H */
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.c b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.c
deleted file mode 100644
index 39a28e9..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp_option.c
- * @brief DHCP Options and BOOTP Vendor Extensions as per RFC 2132.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp_option.h"
-
-#include "tnet_dhcp_option_sip.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_memory.h"
-#include "tsk_debug.h"
-
-tnet_dhcp_option_t* tnet_dhcp_option_create(tnet_dhcp_option_code_t code)
-{
- return tsk_object_new(tnet_dhcp_option_def_t, code);
-}
-
-tnet_dhcp_option_paramslist_t* tnet_dhcp_option_paramslist_create()
-{
- return tsk_object_new(tnet_dhcp_option_paramslist_def_t);
-}
-
-tnet_dhcp_option_dns_t* tnet_dhcp_option_dns_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp_option_dns_def_t, payload, payload_size);
-}
-
-/** Initializes DHCPv4 option.
- *
- * @param [in,out] self The option to initialize.
- * @param code The code of the option to initialize.
- *
- * @return Zero if succeed and non-zero error code otherwise.
-**/
-int tnet_dhcp_option_init(tnet_dhcp_option_t *self, tnet_dhcp_option_code_t code)
-{
- if(self)
- {
- if(!self->initialized)
- {
- self->code = code;
- //option->value = tsk_buffer_create_null();
-
- self->initialized = tsk_true;
- return 0;
- }
- return -2;
- }
- return -1;
-}
-
-int tnet_dhcp_option_deinit(tnet_dhcp_option_t *self)
-{
- if(self)
- {
- if(self->initialized)
- {
- TSK_OBJECT_SAFE_FREE(self->value);
-
- self->initialized = tsk_false;
- return 0;
- }
- return -2;
- }
- return -1;
-}
-
-tnet_dhcp_option_t* tnet_dhcp_option_deserialize(const void* data, tsk_size_t size)
-{
- tnet_dhcp_option_t *option = 0;
- uint8_t* dataPtr = ((uint8_t*)data);
- //uint8_t* dataEnd = (dataPtr+size);
-
- tnet_dhcp_option_code_t code;
- uint8_t len;
-
- /* Check validity */
- if(!dataPtr || size<2/*Code Len*/){
- goto bail;
- }
-
- code = (tnet_dhcp_option_code_t)*dataPtr++;
- len = *dataPtr++;
-
- switch(code)
- {
- case dhcp_code_SIP_Servers_DHCP_Option:
- {
- option = (tnet_dhcp_option_t *)tnet_dhcp_option_sip_create(dataPtr, len);
- break;
- }
-
- case dhcp_code_Domain_Server:
- {
- option = (tnet_dhcp_option_t *)tnet_dhcp_option_dns_create(dataPtr, len);
- break;
- }
-
- default:
- {
- option = tnet_dhcp_option_create(code);
- }
- }
-
- /* In all case */
- if(option && !option->value && len){
- option->value = tsk_buffer_create((((uint8_t*)data) + 2/*Code Len*/), len);
- }
-
-bail:
- return option;
-}
-
-int tnet_dhcp_option_serialize(const tnet_dhcp_option_t* self, tsk_buffer_t *output)
-{
- if(!self || !output){
- return -1;
- }
-
- /* Code */
- tsk_buffer_append(output, &(self->code), 1);
-
- if(self->value){
- /* Length */
- tsk_buffer_append(output, &(self->value->size), 1);
-
- /* Value */
- tsk_buffer_append(output, self->value->data, self->value->size);
- }
- else{
- /* Length */
- static uint8_t zero = 0x00;
- tsk_buffer_append(output, &zero, 1);
- }
-
- return 0;
-}
-
-int tnet_dhcp_option_serializeex(tnet_dhcp_option_code_t code, uint8_t length, const void* value, tsk_buffer_t *output)
-{
- if(value && length && output){
- tsk_buffer_append(output, &(code), 1);
- tsk_buffer_append(output, &(length), 1);
- tsk_buffer_append(output, value, length);
-
- return 0;
- }
- return -1;
-}
-
-//
-// [[DHCP OPTION]] object definition
-//
-static tsk_object_t* tnet_dhcp_option_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_option_t *option = self;
- if(option){
- tnet_dhcp_option_init(option, va_arg(*app, tnet_dhcp_option_code_t));
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_option_dtor(tsk_object_t * self)
-{
- tnet_dhcp_option_t *option = self;
- if(option){
- tnet_dhcp_option_deinit(option);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_option_def_s =
-{
- sizeof(tnet_dhcp_option_t),
- tnet_dhcp_option_ctor,
- tnet_dhcp_option_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_option_def_t = &tnet_dhcp_option_def_s;
-
-
-
-/*=======================================================================================
-* RFC 2132 - 9.8. Parameter Request List
-*=======================================================================================*/
-int tnet_dhcp_option_paramslist_add_code(tnet_dhcp_option_paramslist_t* self, tnet_dhcp_option_code_t code)
-{
- if(self){
- if(!TNET_DHCP_OPTION(self)->value){
- TNET_DHCP_OPTION(self)->value = tsk_buffer_create_null();
- }
- return tsk_buffer_append(TNET_DHCP_OPTION(self)->value, &code, 1);
- }
- return -1;
-}
-
-//
-// [[DHCP OPTION - RFC 2132 9.8. Parameter Request List]] object definition
-//
-static tsk_object_t* tnet_dhcp_option_paramslist_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_option_paramslist_t *option = self;
- if(option){
- /* init base */
- tnet_dhcp_option_init(TNET_DHCP_OPTION(option), dhcp_code_Parameter_List);
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_option_paramslist_dtor(tsk_object_t * self)
-{
- tnet_dhcp_option_paramslist_t *option = self;
- if(option){
- /* deinit base */
- tnet_dhcp_option_deinit(TNET_DHCP_OPTION(option));
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_option_paramslist_def_s =
-{
- sizeof(tnet_dhcp_option_paramslist_t),
- tnet_dhcp_option_paramslist_ctor,
- tnet_dhcp_option_paramslist_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_option_paramslist_def_t = &tnet_dhcp_option_paramslist_def_s;
-
-
-/*=======================================================================================
-* RFC 2132 - 3.8. Domain Name Server Option
-*=======================================================================================*/
-//
-// [[DHCP OPTION - RFC 2132 3.8. Domain Name Server Option]] object definition
-//
-static tsk_object_t* tnet_dhcp_option_dns_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_option_dns_t *option = self;
- if(option){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- const uint8_t* payloadPtr = (const uint8_t*)payload;
- const uint8_t* payloadEnd = (payloadPtr + payload_size);
-
- /* init base */
- tnet_dhcp_option_init(TNET_DHCP_OPTION(option), dhcp_code_Domain_Server);
-
- option->servers = tsk_list_create();
-
- if(payload_size<4 || payload_size%4){
- TSK_DEBUG_ERROR("DHCP - The minimum length for this option is 4 octets, and the length MUST always be a multiple of 4.");
- }
- else{
- tsk_size_t i;
- char* ip4 = 0;
- uint32_t address;
- tsk_string_t* addrstring;
-
- for(i=0; i<payload_size && (payloadPtr< payloadEnd); i+=4){
- /*
- Code Len Address 1 Address 2
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- | 6 | n | a1 | a2 | a3 | a4 | a1 | a2 | ...
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- */
- address = tnet_htonl_2(payloadPtr);
- tsk_sprintf(&ip4, "%u.%u.%u.%u", (address>>24)&0xFF, (address>>16)&0xFF, (address>>8)&0xFF, (address>>0)&0xFF);
-
- addrstring = tsk_string_create(ip4);
- tsk_list_push_back_data(option->servers, (void*)&addrstring);
-
- TSK_FREE(ip4);
- payloadPtr+= 4;
- }
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_option_dns_dtor(tsk_object_t * self)
-{
- tnet_dhcp_option_dns_t *option = self;
- if(option){
- /* deinit base */
- tnet_dhcp_option_deinit(TNET_DHCP_OPTION(option));
-
- TSK_OBJECT_SAFE_FREE(option->servers);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_option_dns_def_s =
-{
- sizeof(tnet_dhcp_option_dns_t),
- tnet_dhcp_option_dns_ctor,
- tnet_dhcp_option_dns_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_option_dns_def_t = &tnet_dhcp_option_dns_def_s;
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.h b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.h
deleted file mode 100644
index b9c313e..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp_option.h
- * @brief DHCP Options and BOOTP Vendor Extensions as per RFC 2132.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DHCP_OPTION_H
-#define TNET_DHCP_OPTION_H
-
-#include "tinynet_config.h"
-
-#include "tsk_buffer.h"
-#include "tsk_string.h"
-
-TNET_BEGIN_DECLS
-
-#define TNET_DHCP_OPTION(self) ((tnet_dhcp_option_t*)(self))
-
-typedef enum tnet_dhcp_option_code_e
-{
- dhcp_code_Pad= 0 ,/**< Pad 0 None [RFC2132] */
- dhcp_code_Subnet_Mask= 1 ,/**< Subnet Mask 4 Subnet Mask Value [RFC2132] */
- dhcp_code_Time_Offset= 2 ,/**< Time Offset 4 Time Offset in Seconds from UTC [RFC2132] (note: deprecated by 100 and 101) */
- dhcp_code_Router= 3 ,/**< Router N N/4 Router addresses [RFC2132] */
- dhcp_code_Time_Server= 4 ,/**< Time Server N N/4 Timeserver addresses [RFC2132] */
- dhcp_code_Name_Server= 5 ,/**< Name Server N N/4 IEN-116 Server addresses [RFC2132] */
- dhcp_code_Domain_Server= 6 ,/**< Domain Server N N/4 DNS Server addresses [RFC2132] */
- dhcp_code_Log_Server= 7 ,/**< Log Server N N/4 Logging Server addresses [RFC2132] */
- dhcp_code_Quotes_Server= 8 ,/**< Quotes Server N N/4 Quotes Server addresses [RFC2132] */
- dhcp_code_LPR_Server= 9 ,/**< LPR Server N N/4 Printer Server addresses [RFC2132] */
- dhcp_code_Impress_Server= 10 ,/**< Impress Server N N/4 Impress Server addresses [RFC2132] */
- dhcp_code_RLP_Server= 11 ,/**< RLP Server N N/4 RLP Server addresses [RFC2132] */
- dhcp_code_Hostname= 12 ,/**< Hostname N Hostname string [RFC2132] */
- dhcp_code_Boot_File_Size= 13 ,/**< Boot File Size 2 Size of boot file in 512 byte chunks [RFC2132] */
- dhcp_code_Merit_Dump_File= 14 ,/**< Merit Dump File N Client to dump and name the file to dump it to [RFC2132] */
- dhcp_code_Domain_Name= 15 ,/**< Domain Name N The DNS domain name of the client [RFC2132] */
- dhcp_code_Swap_Server= 16 ,/**< Swap Server N Swap Server address [RFC2132] */
- dhcp_code_Root_Path= 17 ,/**< Root Path N Path name for root disk [RFC2132] */
- dhcp_code_Extension_File= 18 ,/**< Extension File N Path name for more BOOTP info [RFC2132] */
- dhcp_code_Forward_On_Off= 19 ,/**< Forward On/Off 1 Enable/Disable IP Forwarding [RFC2132] */
- dhcp_code_SrcRte_On_Off = 20 ,/**< SrcRte On/Off 1 Enable/Disable Source Routing [RFC2132] */
- dhcp_code_Policy_Filter= 21 ,/**< Policy Filter N Routing Policy Filters [RFC2132] */
- dhcp_code_Max_DG_Assembly= 22 ,/**< Max DG Assembly 2 Max Datagram Reassembly Size [RFC2132] */
- dhcp_code_Default_IP_TTL= 23 ,/**< Default IP TTL 1 Default IP Time to Live [RFC2132] */
- dhcp_code_MTU_Timeout= 24 ,/**< MTU Timeout 4 Path MTU Aging Timeout [RFC2132] */
- dhcp_code_MTU_Plateau= 25 ,/**< MTU Plateau N Path MTU Plateau Table [RFC2132] */
- dhcp_code_MTU_Interface= 26 ,/**< MTU Interface 2 Interface MTU Size [RFC2132] */
- dhcp_code_MTU_Subnet= 27 ,/**< MTU Subnet 1 All Subnets are Local [RFC2132] */
- dhcp_code_Broadcast_Address= 28 ,/**< Broadcast Address 4 Broadcast Address [RFC2132] */
- dhcp_code_Mask_Discovery= 29 ,/**< Mask Discovery 1 Perform Mask Discovery [RFC2132] */
- dhcp_code_Mask_Supplier= 30 ,/**< Mask Supplier 1 Provide Mask to Others [RFC2132] */
- dhcp_code_Router_Discovery= 31 ,/**< Router Discovery 1 Perform Router Discovery [RFC2132] */
- dhcp_code_Router_Request= 32 ,/**< Router Request 4 Router Solicitation Address [RFC2132] */
- dhcp_code_Static_Route= 33 ,/**< Static Route N Static Routing Table [RFC2132] */
- dhcp_code_Trailers= 34 ,/**< Trailers 1 Trailer Encapsulation [RFC2132] */
- dhcp_code_ARP_Timeout= 35 ,/**< ARP Timeout 4 ARP Cache Timeout [RFC2132] */
- dhcp_code_Ethernet= 36 ,/**< Ethernet 1 Ethernet Encapsulation [RFC2132] */
- dhcp_code_Default_TCP_TTL= 37 ,/**< Default TCP TTL 1 Default TCP Time to Live [RFC2132] */
- dhcp_code_Keepalive_Time= 38 ,/**< Keepalive Time 4 TCP Keepalive Interval [RFC2132] */
- dhcp_code_Keepalive_Data= 39 ,/**< Keepalive Data 1 TCP Keepalive Garbage [RFC2132] */
- dhcp_code_NIS_Domain= 40 ,/**< NIS Domain N NIS Domain Name [RFC2132] */
- dhcp_code_NIS_Servers= 41 ,/**< NIS Servers N NIS Server Addresses [RFC2132] */
- dhcp_code_NTP_Servers= 42 ,/**< NTP Servers N NTP Server Addresses [RFC2132] */
- dhcp_code_Vendor_Specific= 43 ,/**< Vendor Specific N Vendor Specific Information [RFC2132] */
- dhcp_code_NETBIOS_Name_Srv= 44 ,/**< NETBIOS Name Srv N NETBIOS Name Servers [RFC2132] */
- dhcp_code_NETBIOS_Dist_Srv= 45 ,/**< NETBIOS Dist Srv N NETBIOS Datagram Distribution [RFC2132] */
- dhcp_code_NETBIOS_Node_Type= 46 ,/**< NETBIOS Node Type 1 NETBIOS Node Type [RFC2132] */
- dhcp_code_NETBIOS_Scope= 47 ,/**< NETBIOS Scope N NETBIOS Scope [RFC2132] */
- dhcp_code_X_Window_Font= 48 ,/**< X Window Font N X Window Font Server [RFC2132] */
- dhcp_code_X_Window_Manager= 49 ,/**< X Window Manager N X Window Display Manager [RFC2132] */
- dhcp_code_Address_Request= 50 ,/**< Address Request 4 Requested IP Address [RFC2132] */
- dhcp_code_Address_Time= 51 ,/**< Address Time 4 IP Address Lease Time [RFC2132] */
- dhcp_code_Overload= 52 ,/**< Overload 1 Overload "sname" or "file" [RFC2132] */
- dhcp_code_DHCP_Msg_Type= 53 ,/**< DHCP Msg Type 1 DHCP Message Type [RFC2132] */
- dhcp_code_DHCP_Server_Id= 54 ,/**< DHCP Server Id 4 DHCP Server Identification [RFC2132] */
- dhcp_code_Parameter_List= 55 ,/**< Parameter List N Parameter Request List [RFC2132] */
- dhcp_code_DHCP_Error_Message= 56 ,/**< DHCP Message N DHCP Error Message [RFC2132] */
- dhcp_code_DHCP_Max_Msg_Size= 57 ,/**< DHCP Max Msg Size 2 DHCP Maximum Message Size [RFC2132] */
- dhcp_code_Renewal_Time= 58 ,/**< Renewal Time 4 DHCP Renewal (T1) Time [RFC2132] */
- dhcp_code_Rebinding_Time= 59 ,/**< Rebinding Time 4 DHCP Rebinding (T2) Time [RFC2132] */
- dhcp_code_Class_Id= 60 ,/**< Class Id N Class Identifier [RFC2132] */
- dhcp_code_Client_Id= 61 ,/**< Client Id N Client Identifier [RFC2132] */
- dhcp_code_NetWare_IP_Domain= 62 ,/**< NetWare/IP Domain N NetWare/IP Domain Name [RFC2242] */
- dhcp_code_NetWare_IP_Option= 63 ,/**< NetWare/IP Option N NetWare/IP sub Options [RFC2242] */
- dhcp_code_NIS_Domain_Name= 64 ,/**< NIS-Domain-Name N NIS+ v3 Client Domain Name [RFC2132] */
- dhcp_code_NIS_Server_Addr = 65 ,/**< NIS-Server-Addr N NIS+ v3 Server Addresses [RFC2132] */
- dhcp_code_Server_Name= 66 ,/**< Server-Name N TFTP Server Name [RFC2132] */
- dhcp_code_Bootfile_Name= 67 ,/**< Bootfile-Name N Boot File Name [RFC2132] */
- dhcp_code_Home_Agent_Addrs= 68 ,/**< Home-Agent-Addrs N Home Agent Addresses [RFC2132] */
- dhcp_code_SMTP_Server= 69 ,/**< SMTP-Server N Simple Mail Server Addresses [RFC2132] */
- dhcp_code_POP3_Server= 70 ,/**< POP3-Server N Post Office Server Addresses [RFC2132] */
- dhcp_code_NNTP_Server= 71 ,/**< NNTP-Server N Network News Server Addresses [RFC2132] */
- dhcp_code_WWW_Server= 72 ,/**< WWW-Server N WWW Server Addresses [RFC2132] */
- dhcp_code_Finger_Server= 73 ,/**< Finger-Server N Finger Server Addresses [RFC2132] */
- dhcp_code_IRC_Server= 74 ,/**< IRC-Server N Chat Server Addresses [RFC2132] */
- dhcp_code_StreetTalk_Server= 75 ,/**< StreetTalk-Server N StreetTalk Server Addresses [RFC2132] */
- dhcp_code_STDA_Server= 76 ,/**< STDA-Server N ST Directory Assist. Addresses [RFC2132] */
- dhcp_code_User_Class= 77 ,/**< User-Class N User Class Information [RFC3004] */
- dhcp_code_Directory_Agent = 78 ,/**< Directory Agent N directory agent information [RFC2610] */
- dhcp_code_Service_Scope = 79 ,/**< Service Scope N service location agent scope [RFC2610] */
- dhcp_code_Rapid_Commit= 80 ,/**< Rapid Commit 0 Rapid Commit [RFC4039] */
- dhcp_code_Client_FQDN = 81 ,/**< Client FQDN N Fully Qualified Domain Name [RFC4702] */
- dhcp_code_Relay_Agent_Information= 82 ,/**< Relay Agent Information N Relay Agent Information [RFC3046] */
- dhcp_code_iSNS= 83 ,/**< iSNS N Internet Storage Name Service [RFC4174] */
- //84 REMOVED/Unassigned [RFC3679] */
- dhcp_code_NDS_Servers= 85 ,/**< NDS Servers N Novell Directory Services [RFC2241] */
- dhcp_code_NDS_Tree_Name= 86 ,/**< NDS Tree Name N Novell Directory Services [RFC2241] */
- dhcp_code_NDS_Context= 87 ,/**< NDS Context N Novell Directory Services [RFC2241] */
- dhcp_code_BCMCS_Controller_Domain_Name_list= 88 ,/**< BCMCS Controller Domain Name list [RFC4280] */
- dhcp_code_BCMCS_Controller_IPv4_address_option= 89 ,/**< BCMCS Controller IPv4 address option [RFC4280] */
- dhcp_code_Authentication= 90 ,/**< Authentication N Authentication [RFC3118] */
- dhcp_code_client_last_transaction_time= 91 ,/**< client-last-transaction-time option [RFC4388] */
- dhcp_code_associated_ip= 92 ,/**< associated-ip option [RFC4388] */
- dhcp_code_Client_System = 93 ,/**< Client System N Client System Architecture [RFC4578] */
- dhcp_code_Client_NDI = 94 ,/**< Client NDI N Client Network Device Interface [RFC4578] */
- dhcp_code_LDAP= 95 ,/**< LDAP N Lightweight Directory Access Protocol [RFC3679] */
- dhcp_code_REMOVED_Unassigned= 96 ,/**< REMOVED/Unassigned [RFC3679] */
- dhcp_code_UUID_GUID= 97 ,/**< UUID/GUID N UUID/GUID-based Client Identifier [RFC4578] */
- dhcp_code_User_Auth= 98 ,/**< User-Auth N Open Group's User Authentication [RFC2485] */
- dhcp_code_GEOCONF_CIVIC= 99 ,/**< GEOCONF_CIVIC [RFC4776] */
- dhcp_code_PCode= 100 ,/**< PCode N IEEE 1003.1 TZ String [RFC4833] */
- dhcp_code_TCode= 101 ,/**< TCode N Reference to the TZ Database [RFC4833] */
- //102-107 REMOVED/Unassigned [RFC3679]
- //108 REMOVED/Unassigned [RFC3679]
- //109 Unassigned [RFC3679]
- //110 REMOVED/Unassigned [RFC3679]
- //111 Unassigned [RFC3679]
- dhcp_code_Netinfo_Address= 112 ,/**< Netinfo Address N NetInfo Parent Server Address [RFC3679] */
- dhcp_code_Netinfo_Tag= 113 ,/**< Netinfo Tag N NetInfo Parent Server Tag [RFC3679] */
- dhcp_code_= 114 ,/**< URL N URL [RFC3679] */
- //115 REMOVED/Unassigned [RFC3679]
- dhcp_code_Auto_Config= 116 ,/**< Auto-Config N DHCP Auto-Configuration [RFC2563] */
- dhcp_code_Name_Service_Search= 117 ,/**< Name Service Search N Name Service Search [RFC2937] */
- dhcp_code_Subnet_Selection_Option= 118 ,/**< Subnet Selection Option 4 Subnet Selection Option [RFC3011] */
- dhcp_code_Domain_Search= 119 ,/**< Domain Search N DNS domain search list [RFC3397] */
- dhcp_code_SIP_Servers_DHCP_Option= 120 ,/**< SIP Servers DHCP Option N SIP Servers DHCP Option [RFC3361] */
- dhcp_code_Classless_Static_Route_Option= 121 ,/**< Classless Static Route Option N Classless Static Route Option [RFC3442] */
- dhcp_code_CCC= 122 ,/**< CCC N CableLabs Client Configuration [RFC3495] */
- dhcp_code_GeoConf_Option= 123 ,/**< GeoConf Option 16 GeoConf Option [RFC3825] */
- dhcp_code_V_I_Vendor_Class= 124 ,/**< V-I Vendor Class Vendor-Identifying Vendor Class [RFC3925] */
- dhcp_code_V_I_Vendor_Specific_Information= 125 ,/**< V-I Vendor-Specific Information Vendor-Identifying Vendor-Specific Information [RFC3925] */
- //dhcp_code_= 126 ,/**< Removed/Unassigned [RFC3679] */
- //dhcp_code_= 127 ,/**< Removed/Unassigned [RFC3679] */
- //dhcp_code_PXE - undefined= 128 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_Etherboot_signature= 128 ,/**< Etherboot signature. 6 bytes: E4:45:74:68:00:00 */
- dhcp_code_DOCSIS= 128 ,/**< DOCSIS "full security" server IP address */
- dhcp_code_TFTP_Server_IP= 128 ,/**< TFTP Server IP address (for IP Phone software load) */
- //dhcp_code_= 129 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_Kernel_options= 129 ,/**< Kernel options. Variable length string */
- dhcp_code_Call_Server_IP= 129 ,/**< Call Server IP address */
- //dhcp_code_= 130 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_Ethernet_interface= 130 ,/**< Ethernet interface. Variable length string. */
- dhcp_code_Discrimination= 130 ,/**< Discrimination string (to identify vendor) */
- //dhcp_code_= 131 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_Remote_statistics_server_IP= 131 ,/**< Remote statistics server IP address */
- //dhcp_code_= 132 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_IEEE_802_1Q_VLAN_ID= 132 ,/**< IEEE 802.1Q VLAN ID */
- //dhcp_code_= 133 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_IEEE_802_1D_p= 133 ,/**< IEEE 802.1D/p Layer 2 Priority */
- //dhcp_code_= 134 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_DSCP= 134 ,/**< Diffserv Code Point (DSCP) for VoIP signalling and media streams */
- //dhcp_code_= 135 ,/**< PXE - undefined (vendor specific) [RFC4578] */
- dhcp_code_HTTP_Proxy= 135 ,/**< HTTP Proxy for phone-specific applications */
- dhcp_code_OPTION_PANA_AGENT= 136 ,/**< OPTION_PANA_AGENT [RFC5192] */
- dhcp_code_OPTION_V4_LOST= 137 ,/**< OPTION_V4_LOST [RFC5223] */
- dhcp_code_OPTION_CAPWAP_AC_V4= 138 ,/**< OPTION_CAPWAP_AC_V4 N CAPWAP Access Controller addresses [RFC5417] */
- dhcp_code_OPTION_IPv4_Address_MoS= 139 ,/**< OPTION-IPv4_Address-MoS N a series of suboptions [RFC5678] */
- dhcp_code_OPTION_IPv4_FQDN_MoS= 140 ,/**< OPTION-IPv4_FQDN-MoS N a series of suboptions [RFC5678] */
- //141-149 Unassigned [RFC3942] */
- dhcp_code_TFTP_server_address= 150 ,/**< TFTP server address (Tentatively Assigned - 2005-06-23) */
- dhcp_code_Etherboot= 150 ,/**< Etherboot */
- dhcp_code_GRUB_configuration_path_name= 150 ,/**< GRUB configuration path name */
- //151-174 Unassigned [RFC3942]
- //dhcp_code_Etherboot= 175 ,/**< Etherboot (Tentatively Assigned - 2005-06-23) */
- dhcp_code_IP_Telephone= 176 ,/**< IP Telephone (Tentatively Assigned - 2005-06-23) */
- //dhcp_code_Etherboot= 177 ,/**< Etherboot (Tentatively Assigned - 2005-06-23) */
- dhcp_code_PacketCable_and_CableHome= 177 ,/**< PacketCable and CableHome (replaced by 122) */
- //178-207 Unassigned [RFC3942]
- dhcp_code_PXELINUX_Magic= 208 ,/**< PXELINUX Magic 4 magic string = F1:00:74:7E [RFC5071] Deprecated */
- dhcp_code_Configuration_File= 209 ,/**< Configuration File N Configuration file [RFC5071] */
- dhcp_code_Path_Prefix= 210 ,/**< Path Prefix N Path Prefix Option [RFC5071] */
- dhcp_code_Reboot_Time = 211 ,/**< Reboot Time 4 Reboot Time [RFC5071] */
- // 212-219 Unassigned
- dhcp_code_Subnet_Allocation= 220 ,/**< Subnet Allocation Option (Tentatively Assigned - 2005-06-23) */
- dhcp_code_Virtual_Subnet= 221 ,/**< Virtual Subnet Selection Option (Tentatively Assigned - 2005-06-23) */
- // 222-223 Unassigned [RFC3942]
- //224-254 Reserved (Private Use)
- dhcp_code_null=224 ,
- dhcp_code_End= 255 ,/**< End 0 None [RFC2132] */
-}
-tnet_dhcp_option_code_t;
-
-/** DHCP/BOOTP option as per RFC 2132.
-* Format ==> subclause 2.
-*/
-typedef struct tnet_dhcp_option_s
-{
- TSK_DECLARE_OBJECT;
-
- tsk_bool_t initialized;
-
- tnet_dhcp_option_code_t code; /**< 1-byte option-code. */
- tsk_buffer_t *value;
-}
-tnet_dhcp_option_t;
-
-typedef tsk_list_t tnet_dhcp_options_L_t;
-
-#define TNET_DECLARE_DHCP_OPTION tnet_dhcp_option_t dhcp_option
-
-int tnet_dhcp_option_init(tnet_dhcp_option_t *self, tnet_dhcp_option_code_t code);
-int tnet_dhcp_option_deinit(tnet_dhcp_option_t *self);
-
-tnet_dhcp_option_t* tnet_dhcp_option_deserialize(const void* data, tsk_size_t size);
-int tnet_dhcp_option_serialize(const tnet_dhcp_option_t* self, tsk_buffer_t *output);
-int tnet_dhcp_option_serializeex(tnet_dhcp_option_code_t code, uint8_t length, const void* value, tsk_buffer_t *output);
-
-/*=======================================================================================
-* RFC 2132 - 9.8. Parameter Request List
-*=======================================================================================*/
-
-/** Parameter Request List Option */
-typedef struct tnet_dhcp_option_paramslist_s
-{
- TNET_DECLARE_DHCP_OPTION;
-
- /* RFC 2132 - 9.8. Parameter Request List
- Code Len Option Codes
- +-----+-----+-----+-----+---
- | 55 | n | c1 | c2 | ...
- +-----+-----+-----+-----+---
- */
-}
-tnet_dhcp_option_paramslist_t;
-int tnet_dhcp_option_paramslist_add_code(tnet_dhcp_option_paramslist_t* self, tnet_dhcp_option_code_t code);
-
-/*=======================================================================================
-* RFC 2132 - 3.8. Domain Name Server Option
-*=======================================================================================*/
-
-/** Domain Name Server Option */
-typedef struct tnet_dhcp_option_dns_s
-{
- TNET_DECLARE_DHCP_OPTION;
-
- /* RFC 2132 - 3.8. Domain Name Server Option
- Code Len Address 1 Address 2
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- | 6 | n | a1 | a2 | a3 | a4 | a1 | a2 | ...
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- */
- tsk_strings_L_t *servers;
-}
-tnet_dhcp_option_dns_t;
-
-TINYNET_API tnet_dhcp_option_t* tnet_dhcp_option_create(tnet_dhcp_option_code_t code);
-TINYNET_API tnet_dhcp_option_paramslist_t* tnet_dhcp_option_paramslist_create();
-TINYNET_API tnet_dhcp_option_dns_t* tnet_dhcp_option_dns_create(const void* payload, tsk_size_t payload_size);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_option_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_ns_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_option_paramslist_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_option_dns_def_t;
-
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP_OPTION_H */
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.c b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.c
deleted file mode 100644
index 69d564e..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp_option_sip.c
- * @brief Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for
- * Session Initiation Protocol (SIP) Servers as per RFC 3361.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp_option_sip.h"
-
-#include "dns/tnet_dns_rr.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_memory.h"
-#include "tsk_string.h"
-
-tnet_dhcp_option_sip_t* tnet_dhcp_option_sip_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp_option_sip_def_t, payload, payload_size);
-}
-
-//
-// [[DHCP SIP4]] object definition
-//
-static tsk_object_t* tnet_dhcp_option_sip_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp_option_sip_t *option = self;
- if(option){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- const uint8_t* payloadPtr = (const uint8_t*)payload;
- const uint8_t* payloadEnd = (payloadPtr + payload_size);
-
- /* init base */
- tnet_dhcp_option_init(TNET_DHCP_OPTION(option), dhcp_code_SIP_Servers_DHCP_Option);
-
- option->servers = tsk_list_create();
-
- /* Set values as per RFC 3361. */
- if(*payloadPtr == 0){ /* enc=0 */
- /*
- +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
- |120|27 | 0 | 7 |'e'|'x'|'a'|'m'|'p'|'l'|'e'| 3 |'c'|'o'|'m'| 0 |
- +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
- +---+---+---+---+---+---+---+---+---+---+---+---+---+ | 7
- |'e'|'x'|'a'|'m'|'p'|'l'|'e'| 3 |'n'|'e'|'t'| 0 | +---+---+---
- +---+---+---+---+---+---+---+---+---+---+
- */
- tsk_size_t offset = 1;
- char* server = 0;
- payloadPtr++;
- while((payloadPtr < payloadEnd) && !tnet_dns_rr_qname_deserialize(payload, &server, &offset)){
- tsk_string_t* string = tsk_string_create(server);
- tsk_list_push_back_data(option->servers, (void*)&string);
- TSK_FREE(server);
- payloadPtr += offset;
- }
- }
- else{
- /*
- Code Len enc Address 1 Address 2
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- | 120 | n | 1 | a1 | a2 | a3 | a4 | a1 | ...
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- */
- uint32_t address;
- tsk_string_t* addrstring;
- char* ip4 = 0;
-
- while(payloadPtr < payloadEnd){
- ++payloadPtr;
- address = tnet_htonl_2(payloadPtr);
-
- tsk_sprintf(&ip4, "%u.%u.%u.%u", (address>>24)&0xFF, (address>>16)&0xFF, (address>>8)&0xFF, (address>>0)&0xFF);
-
- addrstring = tsk_string_create(ip4);
- tsk_list_push_back_data(option->servers, (void*)&addrstring);
-
- TSK_FREE(ip4);
-
- payloadPtr+= 4;
- }
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp_option_sip_dtor(tsk_object_t * self)
-{
- tnet_dhcp_option_sip_t *option = self;
- if(option){
- /* deinit base */
- tnet_dhcp_option_deinit(TNET_DHCP_OPTION(option));
-
- TSK_OBJECT_SAFE_FREE(option->servers);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp_option_sip_def_s =
-{
- sizeof(tnet_dhcp_option_sip_t),
- tnet_dhcp_option_sip_ctor,
- tnet_dhcp_option_sip_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp_option_sip_def_t = &tnet_dhcp_option_sip_def_s;
diff --git a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.h b/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.h
deleted file mode 100644
index 8db7049..0000000
--- a/branches/1.0/tinyNET/src/dhcp/tnet_dhcp_option_sip.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp_option_sip.h
- * @brief Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for
- * Session Initiation Protocol (SIP) Servers as per RFC 3361.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef tnet_dhcp_option_sip_H
-#define tnet_dhcp_option_sip_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dhcp_option.h"
-
-#include "tsk_string.h"
-
-TNET_BEGIN_DECLS
-
-typedef struct tnet_dhcp_option_sip_s
-{
- TNET_DECLARE_DHCP_OPTION;
-
- /* RFC 3361 subclause 3.1
- Code Len enc DNS name of SIP server
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- | 120 | n | 0 | s1 | s2 | s3 | s4 | s5 | ...
- +-----+-----+-----+-----+-----+-----+-----+-----+--
- */
- tsk_strings_L_t *servers;
-}
-tnet_dhcp_option_sip_t;
-
-TINYNET_API tnet_dhcp_option_sip_t* tnet_dhcp_option_sip_create(const void* payload, tsk_size_t payload_size);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp_option_sip_def_t;
-
-TNET_END_DECLS
-
-#endif /* #define tnet_dhcp_option_sip_H */
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.c b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.c
deleted file mode 100644
index cc52476..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6.c
- * @brief Dynamic Host Configuration Protocol for IPv6 (DHCPv6) as per RFC 3315.
- * Also implement: RFC 3319, 3633, 3646, 3736, 4242, 5007 ...
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp6.h"
-
-#include "tsk_string.h"
-#include "tsk_debug.h"
-#include "tsk_memory.h"
-#include "tsk_time.h"
-#include "tsk_thread.h"
-
-
-/**@defgroup tnet_dhcp6_group DHCPv6 (RFC 3315) implementation.
-* Dynamic Host Configuration Protocol for IPv6 (DHCPv6) as per RFC 3315.
-* Also implement: RFC 3319, 3633, 3646, 3736, 4242, 5007 ...
-*/
-
-tnet_dhcp6_ctx_t* tnet_dhcp6_ctx_create()
-{
- return tsk_object_new(tnet_dhcp6_ctx_def_t);
-}
-
-/**@ingroup tnet_dhcp6_group
-*/
-tnet_dhcp6_reply_t* tnet_dhcp6_send_request(const tnet_dhcp6_ctx_t* ctx, tnet_dhcp6_request_t* request)
-{
- tsk_buffer_t *output;
- tnet_dhcp6_reply_t* reply = 0;
- int ret;
- struct timeval tv;
- fd_set set;
- uint64_t timeout = 0;
- tsk_list_item_t *item;
- const tnet_interface_t *iface;
- tnet_ip_t bestsource;
-
- tnet_socket_t *localsocket6 = 0;
- struct sockaddr_storage server;
-
- if(!ctx || !request){
- goto bail;
- }
-
- if((ret = tnet_getbestsource(TNET_DHCP6_All_DHCP_Relay_Agents_and_Servers, ctx->server_port, tnet_socket_type_udp_ipv6, &bestsource))){
- TSK_DEBUG_WARN("Failed to get best source for [%s]:%u.", TNET_DHCP6_All_DHCP_Relay_Agents_and_Servers, ctx->server_port);
- //fe80::21b:63ff:fea9:c14e%4
- localsocket6 = tnet_socket_create(TNET_SOCKET_HOST_ANY, ctx->port_client, tnet_socket_type_udp_ipv6);
- }
- else{
- localsocket6 = tnet_socket_create(bestsource, ctx->port_client, tnet_socket_type_udp_ipv6);
- }
-
- /* Check local socket. */
- if(!TNET_SOCKET_IS_VALID(localsocket6)){
- TSK_DEBUG_ERROR("Failed to create/bind DHCPv6 client socket.");
- goto bail;
- }
-
- /* Always wait for 200ms before retransmission */
- tv.tv_sec = 0;
- tv.tv_usec = (200 * 1000);
-
- if(tnet_sockaddr_init(TNET_DHCP6_All_DHCP_Relay_Agents_and_Servers, ctx->server_port, tnet_socket_type_udp_ipv6, &server)){
- TNET_PRINT_LAST_ERROR("Failed to initialize the DHCPv6 server address.");
- goto bail;
- }
-
- /* Set timeout */
- timeout = tsk_time_epoch() + ctx->timeout;
-
- do
- {
- tsk_list_foreach(item, ctx->interfaces){
- iface = item->data;
-
- /* Set FD */
- FD_ZERO(&set);
- FD_SET(localsocket6->fd, &set);
-
- ///* ciaddr */
- //if(request->type == dhcp_type_inform){
- // struct sockaddr_storage ss;
- // if(!tnet_get_sockaddr(localsocket4->fd, &ss)){
- // uint32_t addr = tnet_htonl_2(&((struct sockaddr_in*)&ss)->sin_addr);
- // memcpy(&request->ciaddr, &addr, 4);
- // }
- //}
-
- ///* chaddr */
- //memset(request->chaddr, 0, sizeof(request->chaddr));
- //request->hlen = iface->mac_address_length > sizeof(request->chaddr) ? sizeof(request->chaddr) : iface->mac_address_length;
- //memcpy(request->chaddr, iface->mac_address, request->hlen);
-
- /* Serialize and send to the server. */
- if(!(output = tnet_dhcp6_message_serialize(ctx, request))){
- TSK_DEBUG_ERROR("Failed to serialize the DHCPv6 message.");
- goto next_iface;
- }
- /* Send the request to the DHCP server */
- if((ret =tnet_sockfd_sendto(localsocket6->fd, (const struct sockaddr*)&server, output->data, output->size))<0){
- TNET_PRINT_LAST_ERROR("Failed to send DHCPv6 request.");
-
- tsk_thread_sleep(150); // wait 150ms before trying the next iface.
- goto next_iface;
- }
- /* wait for response */
- if((ret = select(localsocket6->fd+1, &set, NULL, NULL, &tv))<0){ /* Error */
- TNET_PRINT_LAST_ERROR("select have failed.");
- tsk_thread_sleep(150); // wait 150ms before trying the next iface.
- goto next_iface;
- }
- else if(ret == 0){ /* timeout ==> do nothing */
- }
- else{ /* there is data to read. */
- tsk_size_t len = 0;
- void* data = 0;
-
- /* Check how how many bytes are pending */
- if((ret = tnet_ioctlt(localsocket6->fd, FIONREAD, &len))<0){
- goto next_iface;
- }
-
- /* Receive pending data */
- data = tsk_calloc(len, sizeof(uint8_t));
- if((ret = tnet_sockfd_recv(localsocket6->fd, data, len, 0))<0){
- TSK_FREE(data);
-
- TNET_PRINT_LAST_ERROR("Failed to receive DHCP dgrams.");
- goto next_iface;
- }
-
- /* Parse the incoming response. */
- reply = tnet_dhcp6_message_deserialize(ctx, data, (tsk_size_t)ret);
- TSK_FREE(data);
-
- if(reply)
- { /* response successfuly parsed */
- if(request->transaction_id != reply->transaction_id)
- { /* Not same transaction id ==> continue*/
- TSK_OBJECT_SAFE_FREE(reply);
- }
- }
- }
-
- next_iface:
- TSK_OBJECT_SAFE_FREE(output);
- if(reply){
- goto bail;
- }
- }
- break;//FIXME
- }
- while(timeout > tsk_time_epoch());
-
-bail:
- TSK_OBJECT_SAFE_FREE(localsocket6);
-
- return reply;
-}
-
-
-
-
-
-
-/**@ingroup tnet_dhcp6_group
-*/
-tnet_dhcp6_reply_t* tnet_dhcp6_requestinfo(const tnet_dhcp6_ctx_t* ctx, const tnet_dhcp6_option_orequest_t *orequest)
-{
- tnet_dhcp6_reply_t* reply = 0;
- tnet_dhcp6_request_t* request = tnet_dhcp6_request_create(dhcp6_type_information_request);
- tnet_dhcp6_option_t* option = 0;
-
- if(!ctx || !orequest || !request){
- goto bail;
- }
-
- if((option = tnet_dhcp6_option_create(dhcp6_code_oro, orequest, sizeof(*orequest)))){
- tsk_list_push_back_data(request->options, (void**)&option);
- }
-
- /* Vendor class */
- {
-
- }
-
- reply = tnet_dhcp6_send_request(ctx, request);
-
-bail:
-
- return reply;
-}
-
-
-
-
-
-//=================================================================================================
-// [[DHCPv6 CONTEXT]] object definition
-//
-static tsk_object_t* tnet_dhcp6_ctx_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_ctx_t *ctx = self;
- if(ctx){
- ctx->pen = TNET_IANA_PEN;
- ctx->vendor_class_data = tsk_strdup(TNET_DHCP6_VENDOR_CLASS_DATA_DEFAULT);
-
- ctx->port_client = TNET_DHCP6_CLIENT_PORT;
- ctx->server_port = TNET_DHCP6_SERVER_PORT;
- ctx->interfaces = tnet_get_interfaces();
-
- ctx->timeout = 0xffff; /* FIXME */
-
- if(!ctx->interfaces || TSK_LIST_IS_EMPTY(ctx->interfaces)){
- TSK_DEBUG_ERROR("Failed to retrieve network interfaces.");
- }
-
- tsk_safeobj_init(ctx);
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_ctx_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_ctx_t *ctx = self;
- if(ctx){
- tsk_safeobj_deinit(ctx);
-
- TSK_FREE(ctx->vendor_class_data);
-
- TSK_OBJECT_SAFE_FREE(ctx->interfaces);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_ctx_def_s =
-{
- sizeof(tnet_dhcp6_ctx_t),
- tnet_dhcp6_ctx_ctor,
- tnet_dhcp6_ctx_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_ctx_def_t = &tnet_dhcp6_ctx_def_s;
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.h b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.h
deleted file mode 100644
index 893aaa4..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6.h
- * @brief Dynamic Host Configuration Protocol for IPv6 (DHCPv6) as per RFC 3315.
- * Also implement: RFC 3319, 3633, 3646, 3736, 4242, 5007 ...
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DHCP6_H
-#define TNET_DHCP6_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dhcp6_message.h"
-
-#include "tnet_utils.h"
-
-#include "tsk_object.h"
-#include "tsk_safeobj.h"
-
-TNET_BEGIN_DECLS
-
-#define TNET_DHCP6_VENDOR_CLASS_DATA_DEFAULT "doubango/v0.0.0"
-
-/** RFC 3315 - 5.1. Multicast Addresses
-* A link-scoped multicast address used by a client to communicate with
-* neighboring (i.e., on-link) relay agents and servers.
-* All servers and relay agents are members of this multicast group.
-*/
-#define TNET_DHCP6_All_DHCP_Relay_Agents_and_Servers "FF02::1:2"
-
-/** RFC 3315 - 5.1. Multicast Addresses
-* A site-scoped multicast address used by a relay agent to communicate with servers, either
-* because the relay agent wants to send messages to all servers or because it does not know the unicast
-* addresses of the servers. Note that in order for a relay agent to use this address, it must have an
-* address of sufficient scope to be reachable by the servers. All servers within the site are members of
-* this multicast group.
-*/
-#define TNET_DHCP6_All_DHCP_Servers "FF05::1:3"
-
-/*== RFC 3315 - 5.5. Transmission and Retransmission Parameters
- * This section presents a table of values used to describe the message
- * transmission behavior of clients and servers.
-*/
-#define TNET_DHCP6_RT_SOL_MAX_DELAY 1 /**< 1 sec Max delay of first Solicit */
-#define TNET_DHCP6_RT_SOL_TIMEOUT 1 /**< 1 sec Initial Solicit timeout */
-#define TNET_DHCP6_RT_SOL_MAX_RT 120 /**< 120 secs Max Solicit timeout value */
-#define TNET_DHCP6_RT_REQ_TIMEOUT 1 /**< 1 sec Initial Request timeout */
-#define TNET_DHCP6_RT_REQ_MAX_RT 30 /**< 30 secs Max Request timeout value */
-#define TNET_DHCP6_RT_REQ_MAX_RC 10 /**< 10 Max Request retry attempts */
-#define TNET_DHCP6_RT_CNF_MAX_DELAY 1 /**< 1 sec Max delay of first Confirm */
-#define TNET_DHCP6_RT_CNF_TIMEOUT 1 /**< 1 sec Initial Confirm timeout */
-#define TNET_DHCP6_RT_CNF_MAX_RT 4 /**< 4 secs Max Confirm timeout */
-#define TNET_DHCP6_RT_CNF_MAX_RD 10 /**< 10 secs Max Confirm duration */
-#define TNET_DHCP6_RT_REN_TIMEOUT 10 /**< 10 secs Initial Renew timeout */
-#define TNET_DHCP6_RT_REN_MAX_RT 600 /**< 600 secs Max Renew timeout value */
-#define TNET_DHCP6_RT_REB_TIMEOUT 10 /**< 10 secs Initial Rebind timeout */
-#define TNET_DHCP6_RT_REB_MAX_RT 600 /**< 600 secs Max Rebind timeout value */
-#define TNET_DHCP6_RT_INF_MAX_DELAY 1 /**< 1 sec Max delay of first Information-request */
-#define TNET_DHCP6_RT_INF_TIMEOUT 1 /**< 1 sec Initial Information-request timeout */
-#define TNET_DHCP6_RT_INF_MAX_RT 120 /**< 120 secs Max Information-request timeout value */
-#define TNET_DHCP6_RT_REL_TIMEOUT 1 /**< 1 sec Initial Release timeout */
-#define TNET_DHCP6_RT_REL_MAX_RC 5 /**< 5 MAX Release attempts */
-#define TNET_DHCP6_RT_DEC_TIMEOUT 1 /**< 1 sec Initial Decline timeout */
-#define TNET_DHCP6_RT_DEC_MAX_RC 5 /**< 5 Max Decline attempts */
-#define TNET_DHCP6_RT_REC_TIMEOUT 2 /**< 2 secs Initial Reconfigure timeout */
-#define TNET_DHCP6_RT_REC_MAX_RC 2 /**< 8 Max Reconfigure attempts */
-#define TNET_DHCP6_RT_HOP_COUNT_LIMIT 32 /**< 32 Max hop count in a Relay-forward message */
-
-/** RFC 3315 - 5.6 Representation of time values and "Infinity" as a time value */
-#define TNET_DHCP6_TIMEVAL_INFINITY 0XFFFFFFFF
-
-/**< Local port(client) to bind to for incoming DHCP messages as per RFC 3315 subclause 5.2. */
-#define TNET_DHCP6_CLIENT_PORT 546
-/**< Destination port(Server) for outgoing DHCP messages as per RFC 3315 subclause 5.2. */
-#define TNET_DHCP6_SERVER_PORT 547
-
-/**@ingroup tnet_dhcpv_group
-* DHCPv6 context.
-*/
-typedef struct tnet_dhcp6_ctx_s
-{
- TSK_DECLARE_OBJECT;
-
- uint16_t pen; /**< Private Enterprise Number assigned by the IANA. Default= @ref TNET_IANA_PEN.*/
- char* vendor_class_data;
-
- uint64_t timeout;
-
- tnet_port_t port_client; /**< Local port to bind to for incloming DHCPv6 messages. Default: 546 */
- tnet_port_t server_port; /**< Destination port for outgoing DHCPv6 messages. Default: 547 */
- tnet_interfaces_L_t *interfaces;
-
- TSK_DECLARE_SAFEOBJ;
-}
-tnet_dhcp6_ctx_t;
-
-TINYNET_API tnet_dhcp6_reply_t* tnet_dhcp6_requestinfo(const tnet_dhcp6_ctx_t* ctx, const tnet_dhcp6_option_orequest_t *orequest);
-
-TINYNET_API tnet_dhcp6_ctx_t* tnet_dhcp6_ctx_create();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_ctx_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP6_H */
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.c b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.c
deleted file mode 100644
index 378ba3c..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6_duid.c
- * @brief DHCPv6 (RFC 3315) DHCP Unique Identifier (DUID) as defined in subclause 9.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp6_duid.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-int tnet_dhcp6_duid_llt_serialize(const tnet_dhcp6_duid_llt_t* self, tsk_buffer_t *output);
-int tnet_dhcp6_duid_en_serialize(const tnet_dhcp6_duid_en_t* self, tsk_buffer_t *output);
-int tnet_dhcp6_duid_ll_serialize(const tnet_dhcp6_duid_ll_t* self, tsk_buffer_t *output);
-
-
-tnet_dhcp6_duid_llt_t* tnet_dhcp6_duid_llt_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_duid_llt_def_t, payload, payload_size);
-}
-
-tnet_dhcp6_duid_en_t* tnet_dhcp6_duid_en_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_duid_en_def_t, payload, payload_size);
-}
-
-tnet_dhcp6_duid_ll_t* tnet_dhcp6_duid_ll_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_duid_ll_def_t, payload, payload_size);
-}
-
-int tnet_dhcp6_duid_init(tnet_dhcp6_duid_t *self, tnet_dhcp6_duid_type_t type)
-{
- if(self){
- if(!self->initialized){
- self->type = type;
- self->initialized = tsk_true;
- return 0;
- }
- return -2;
- }
- return -1;
-}
-
-int tnet_dhcp6_duid_deinit(tnet_dhcp6_duid_t *self)
-{
- if(self){
- if(self->initialized){
- self->initialized = tsk_true;
- return 0;
- }
- return -2;
- }
- return -1;
-}
-
-tnet_dhcp6_duid_t* tnet_dhcp6_duid_deserialize(const void* data, tsk_size_t size)
-{
- tnet_dhcp6_duid_t *duid = 0;
- uint8_t* dataPtr = ((uint8_t*)data);
- //uint8_t* dataEnd = (dataPtr+size);
-
- tnet_dhcp6_duid_type_t type;
- //uint8_t len = 0;
-
- /* Check validity */
- if(!dataPtr || size<2/*Type*/){
- goto bail;
- }
-
- type = (tnet_dhcp6_duid_type_t) tnet_ntohs_2(dataPtr);
- dataPtr += 2;
-
-bail:
- return duid;
-}
-
-int tnet_dhcp6_duid_serialize(const tnet_dhcp6_duid_t* self, tsk_buffer_t *output)
-{
- int ret = -1;
-
- if(!self || !output){
- return ret;
- }
-
- switch(self->type){
- case dhcp6_duid_linklayer_plus_time:
- {
- ret = tnet_dhcp6_duid_llt_serialize(TNET_DHCP6_DUID_LLT(self), output);
- break;
- }
-
- case dhcp6_duid_Vendor_assigned_id:
- {
- ret = tnet_dhcp6_duid_en_serialize(TNET_DHCP6_DUID_EN(self), output);
- break;
- }
-
- case dhcp6_duid_linklayer:
- {
- ret = tnet_dhcp6_duid_ll_serialize(TNET_DHCP6_DUID_LL(self), output);
- break;
- }
-
- default:
- {
- ret = -2;
- goto bail;
- }
- }
-
-bail:
- return ret;
-}
-
-/*=======================================================================================
-* RFC 3315 - 9.2. DUID Based on Link-layer Address Plus Time [DUID-LLT]
-*=======================================================================================*/
-
-int tnet_dhcp6_duid_llt_serialize(const tnet_dhcp6_duid_llt_t* self, tsk_buffer_t *output)
-{
- return -1;
-}
-
-//
-// [[DHCPv6 DUID-LLT]] object definition
-//
-static tsk_object_t* tnet_dhcp6_duid_llt_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_duid_llt_t *duid = self;
- if(duid){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dhcp6_duid_init(TNET_DHCP6_DUID(duid), dhcp6_duid_linklayer_plus_time);
-
- if(payload && payload_size){
- /* DESERIALIZATION */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_duid_llt_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_duid_llt_t *duid = self;
- if(duid){
- /* deinit base */
- tnet_dhcp6_duid_deinit(TNET_DHCP6_DUID(duid));
-
- TSK_OBJECT_SAFE_FREE(duid->address);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_duid_llt_def_s =
-{
- sizeof(tnet_dhcp6_duid_llt_t),
- tnet_dhcp6_duid_llt_ctor,
- tnet_dhcp6_duid_llt_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_duid_llt_def_t = &tnet_dhcp6_duid_llt_def_s;
-
-
-/*=======================================================================================
-* RFC 3315 - 9.3. DUID Assigned by Vendor Based on Enterprise Number [DUID-EN]
-*=======================================================================================*/
-
-int tnet_dhcp6_duid_en_serialize(const tnet_dhcp6_duid_en_t* self, tsk_buffer_t *output)
-{
- return -1;
-}
-
-//
-// [[DHCPv6 DUID-EN]] object definition
-//
-static tsk_object_t* tnet_dhcp6_duid_en_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_duid_en_t *duid = self;
- if(duid){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dhcp6_duid_init(TNET_DHCP6_DUID(duid), dhcp6_duid_Vendor_assigned_id);
-
- if(payload && payload_size){
- /* DESERIALIZATION */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_duid_en_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_duid_en_t *duid = self;
- if(duid){
- /* deinit base */
- tnet_dhcp6_duid_deinit(TNET_DHCP6_DUID(duid));
-
- TSK_OBJECT_SAFE_FREE(duid->indentifier);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_duid_en_def_s =
-{
- sizeof(tnet_dhcp6_duid_en_t),
- tnet_dhcp6_duid_en_ctor,
- tnet_dhcp6_duid_en_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_duid_en_def_t = &tnet_dhcp6_duid_en_def_s;
-
-
-/*=======================================================================================
-* RFC 3315 - 9.4. DUID Based on Link-layer Address [DUID-LL]
-*=======================================================================================*/
-
-int tnet_dhcp6_duid_ll_serialize(const tnet_dhcp6_duid_ll_t* self, tsk_buffer_t *output)
-{
- return -1;
-}
-
-//
-// [[DHCPv6 DUID-LL]] object definition
-//
-static tsk_object_t* tnet_dhcp6_duid_ll_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_duid_ll_t *duid = self;
- if(duid){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dhcp6_duid_init(TNET_DHCP6_DUID(duid), dhcp6_duid_linklayer);
-
- if(payload && payload_size){
- /* DESERIALIZATION */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_duid_ll_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_duid_ll_t *duid = self;
- if(duid){
- /* deinit base */
- tnet_dhcp6_duid_deinit(TNET_DHCP6_DUID(duid));
-
- TSK_OBJECT_SAFE_FREE(duid->address);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_duid_ll_def_s =
-{
- sizeof(tnet_dhcp6_duid_ll_t),
- tnet_dhcp6_duid_ll_ctor,
- tnet_dhcp6_duid_ll_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_duid_ll_def_t = &tnet_dhcp6_duid_ll_def_s;
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.h b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.h
deleted file mode 100644
index 9331ab3..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_duid.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6_duid.h
- * @brief DHCPv6 (RFC 3315) DHCP Unique Identifier (DUID) as defined in subclause 9.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DHCP6_duid_H
-#define TNET_DHCP6_duid_H
-
-#include "tinynet_config.h"
-
-#include "tnet_hardwares.h"
-#include "tsk_list.h"
-#include "tsk_buffer.h"
-
-TNET_BEGIN_DECLS
-
-#define TNET_DHCP6_DUID(self) ((tnet_dhcp6_duid_t*)(self))
-#define TNET_DHCP6_DUID_LLT(self) ((tnet_dhcp6_duid_llt_t*)(self))
-#define TNET_DHCP6_DUID_EN(self) ((tnet_dhcp6_duid_en_t*)(self))
-#define TNET_DHCP6_DUID_LL(self) ((tnet_dhcp6_duid_ll_t*)(self))
-
-/** List of DHCPv6 DUIDs types as per RFC 3315 subclause 9.1.
-*/
-typedef enum tnet_dhcp6_duid_type_e
-{
- dhcp6_duid_linklayer_plus_time = 1, /**< Link-layer address plus time. */
- dhcp6_duid_Vendor_assigned_id = 2, /**< Vendor-assigned unique ID based on Enterprise Number. */
- dhcp6_duid_linklayer = 3, /**< Link-layer address. */
-}
-tnet_dhcp6_duid_type_t;
-
-/** DHCP Unique Identifier (DUID) base class (subclause 9).
-*/
-typedef struct tnet_dhcp6_duid_s
-{
- TSK_DECLARE_OBJECT;
-
- tsk_bool_t initialized;
-
- tnet_dhcp6_duid_type_t type; /* DUID type. 2-bytes value. */
-}
-tnet_dhcp6_duid_t;
-
-typedef tsk_list_t tnet_dhcp6_duids_L_t;
-
-#define TNET_DECLARE_DHCP6_DUID tnet_dhcp6_duid_t tnet_dhcp6_duid
-
-int tnet_dhcp6_duid_init(tnet_dhcp6_duid_t *self, tnet_dhcp6_duid_type_t type);
-int tnet_dhcp6_duid_deinit(tnet_dhcp6_duid_t *self);
-
-tnet_dhcp6_duid_t* tnet_dhcp6_duid_deserialize(const void* data, tsk_size_t size);
-int tnet_dhcp6_duid_serialize(const tnet_dhcp6_duid_t* self, tsk_buffer_t *output);
-
-/*=======================================================================================
-* RFC 3315 - 9.2. DUID Based on Link-layer Address Plus Time [DUID-LLT]
-*=======================================================================================*/
-
-/** DUID Based on Link-layer Address Plus Time [DUID-LLT]
-*/
-typedef struct tnet_dhcp6_duid_llt_s
-{
- TNET_DECLARE_DHCP6_DUID;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | 1 | hardware type (16 bits) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | time (32 bits) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . .
- . link-layer address (variable length) .
- . .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- /* The hardware type code as maintained by IANA. */
- tnet_hardware_type_t htype;
- /* The time value is the time that the DUID is generated represented in seconds
- since midnight (UTC), January 1, 2000, modulo 2^32. */
- uint32_t time;
- /* The link-layer address. */
- tsk_buffer_t *address;
-}
-tnet_dhcp6_duid_llt_t;
-
-
-/*=======================================================================================
-* RFC 3315 - 9.3. DUID Assigned by Vendor Based on Enterprise Number [DUID-EN]
-*=======================================================================================*/
-
-/** DUID Assigned by Vendor Based on Enterprise Number [DUID-EN]
-*/
-typedef struct tnet_dhcp6_duid_en_s
-{
- TNET_DECLARE_DHCP6_DUID;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | 2 | enterprise-number |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | enterprise-number (contd) | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
- . identifier .
- . (variable length) .
- . .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- /* Tthe vendor's registered Private Enterprise Number as maintained by IANA.
- For more information: http://www.iana.org/assignments/enterprise-numbers. */
- uint32_t en;
- /* The link-layer address. */
- tsk_buffer_t *indentifier;
-}
-tnet_dhcp6_duid_en_t;
-
-/*=======================================================================================
-* RFC 3315 - 9.4. DUID Based on Link-layer Address [DUID-LL]
-*=======================================================================================*/
-
-/** DUID Based on Link-layer Address [DUID-LL]
-*/
-typedef struct tnet_dhcp6_duid_ll_s
-{
- TNET_DECLARE_DHCP6_DUID;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | 3 | hardware type (16 bits) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . .
- . link-layer address (variable length) .
- . .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- /* The hardware type code as maintained by IANA. */
- tnet_hardware_type_t htype;
- /* The link-layer address. */
- tsk_buffer_t *address;
-}
-tnet_dhcp6_duid_ll_t;
-
-
-
-
-
-
-TINYNET_API tnet_dhcp6_duid_llt_t* tnet_dhcp6_duid_llt_create(const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_duid_en_t* tnet_dhcp6_duid_en_create(const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_duid_ll_t* tnet_dhcp6_duid_ll_create(const void* payload, tsk_size_t payload_size);
-
-
-
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_duid_llt_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_duid_en_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_duid_ll_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP6_duid_H */
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.c b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.c
deleted file mode 100644
index 28304e1..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6_message.c
- * @brief DHCPv6 (RFC 3315) Messages.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp6_message.h"
-#include "tnet_dhcp6.h"
-
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-tnet_dhcp6_message_t* tnet_dhcp6_message_create(tnet_dhcp6_message_type_t type)
-{
- return tsk_object_new(tnet_dhcp6_message_def_t, type);
-}
-
-tnet_dhcp6_request_t* tnet_dhcp6_request_create(tnet_dhcp6_message_type_t type)
-{
- return tnet_dhcp6_message_create(type);
-}
-
-tsk_buffer_t* tnet_dhcp6_message_serialize(const tnet_dhcp6_ctx_t *ctx, const tnet_dhcp6_message_t *self)
-{
- tsk_buffer_t* output = 0;
- //uint8_t _1byte;
- uint16_t _2bytes;
- uint32_t _4bytes;
-
- /* Check message validity */
- if(!self){
- goto bail;
- }
-
- output = tsk_buffer_create_null();
-
- /*== msg-type + transaction-id */
- _4bytes = (((uint32_t)(self->type)) << 24) | (self->transaction_id & 0xFFFFFF);
- _4bytes = tnet_ntohl(_4bytes);
- tsk_buffer_append(output, &(_4bytes), 4);
-
- /*== Vendor class
- */
- {
- _2bytes = tnet_htons(dhcp6_code_vendor_class);
- tsk_buffer_append(output, &(_2bytes), 2);
- _2bytes = tnet_htons(4 + tsk_strlen(ctx->vendor_class_data));
- tsk_buffer_append(output, &(_2bytes), 2);
- _4bytes = tnet_ntohl(ctx->pen);
- tsk_buffer_append(output, &(_4bytes), 4);
- tsk_buffer_append(output, ctx->vendor_class_data, tsk_strlen(ctx->vendor_class_data));
- }
-
- /*== DHCP Options
- */
- {
- tsk_list_item_t *item;
- tnet_dhcp6_option_t* option;
- tsk_list_foreach(item, self->options)
- {
- option = (tnet_dhcp6_option_t*)item->data;
- if(tnet_dhcp6_option_serialize(option, output)){
- TSK_DEBUG_WARN("Failed to serialize DHCPv6 OPTION (%u)", option->code);
- }
- }
- }
-bail:
- return output;
-}
-
-tnet_dhcp6_message_t* tnet_dhcp6_message_deserialize(const tnet_dhcp6_ctx_t *ctx, const uint8_t *data, tsk_size_t size)
-{
- return 0;
-}
-
-
-
-//=================================================================================================
-// [[DHCPv6 MESSAGE]] object definition
-//
-static tsk_object_t* tnet_dhcp6_message_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_message_t *message = self;
- if(message){
- static uint16_t __dhcp6message_unique_tid = 0;//(uint32_t)tsk_time_epoch();
-
- message->type = va_arg(*app, tnet_dhcp6_message_type_t);
- message->transaction_id = ++__dhcp6message_unique_tid;
- message->options = tsk_list_create();
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_message_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_message_t *message = self;
- if(message){
- TSK_OBJECT_SAFE_FREE(message->options);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_message_def_s =
-{
- sizeof(tnet_dhcp6_message_t),
- tnet_dhcp6_message_ctor,
- tnet_dhcp6_message_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_message_def_t = &tnet_dhcp6_message_def_s;
-
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.h b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.h
deleted file mode 100644
index fdf545f..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_message.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6_message.h
- * @brief DHCPv6 (RFC 3315) Messages.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DHCP6_MESSAGE_H
-#define TNET_DHCP6_MESSAGE_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dhcp6_option.h"
-
-#include "tsk_object.h"
-
-TNET_BEGIN_DECLS
-
-struct tnet_dhcp6_ctx_s;
-
-/** List of all supported DHCPv6 messages.
-* For more info: RFC 3315 - 5.3. DHCP Message Types
-*/
-typedef enum tnet_dhcp6_message_type_e
-{
- /* A client sends a Solicit message to locate servers. */
- dhcp6_type_solicit = 1,
- /* A server sends an Advertise message to indicate that it is available for DHCP service, in
- response to a Solicit message received from a client. */
- dhcp6_type_advertise = 2,
- /* A client sends a Request message to request configuration parameters, including IP
- addresses, from a specific server. */
- dhcp6_type_request = 3,
- /* A client sends a Confirm message to any available server to determine whether the
- addresses it was assigned are still appropriate to the link to which the client is connected. */
- dhcp6_type_confirm = 4,
- /* A client sends a Renew message to the server that originally provided the client's addresses
- and configuration parameters to extend the lifetimes on the addresses assigned to the
- client and to update other configurationparameters. */
- dhcp6_type_renew = 5,
- /* A client sends a Rebind message to any available server to extend the lifetimes on the
- addresses assigned to the client and to update other configuration parameters; this message is
- sent after a client receives no response to a Renew message.*/
- dhcp6_type_rebind = 6,
- /* A server sends a Reply message containing assigned addresses and configuration parameters
- in response to a Solicit, Request, Renew, Rebind message received from a client. A
- server sends a Reply message containing configuration parameters in response to an
- Information-request message. A server sends a Reply message in response to a Confirm message
- confirming or denying that the addresses assigned to the client are appropriate to the
- link to which the client is connected. A server sends a Reply message to acknowledge
- receipt of a Release or Decline message.*/
- dhcp6_type_reply = 7,
- /* A client sends a Release message to the server that assigned addresses to the client to
- indicate that the client will no longer use one or more of the assigned addresses.*/
- dhcp6_type_release = 8,
- /* A client sends a Decline message to a server to indicate that the client has determined that
- one or more addresses assigned by the server are already in use on the link to which the
- client is connected.*/
- dhcp6_type_decline = 9,
- /*A server sends a Reconfigure message to a client to inform the client that the server has
- new or updated configuration parameters, and that the client is to initiate a Renew/Reply
- or Information-request/Reply transaction with the server in order to receive the updatedinformation. */
- dhcp6_type_reconfigure = 10,
- /* A client sends an Information-request message to a server to request configuration
- parameters without the assignment of any IP addresses to the client.*/
- dhcp6_type_information_request = 11,
- /* A relay agent sends a Relay-forward message to relay messages to servers, either directly
- or through another relay agent. The received message, either a client message or a
- Relay-forward message from another relay agent, is encapsulated in an option in the Relay-forward message.*/
- dhcp6_type_relay_forw = 12,
- /* A server sends a Relay-reply message to a relay agent containing a message that the relay
- agent delivers to a client. The Relay-reply message may be relayed by other relay agents
- for delivery to the destination relay agent.
- The server encapsulates the client message as an option in the Relay-reply message, which the
- relay agent extracts and relays to the client.*/
- dhcp6_type_relay_repl = 13,
-}
-tnet_dhcp6_message_type_t;
-
-
-/** DHCPv6 message (common fields) as per RFC 3315 subclause 6.
-*/
-typedef struct tnet_dhcp6_message_s
-{
- TSK_DECLARE_OBJECT;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | msg-type | transaction-id |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- . options .
- . (variable) .
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- /* Identifies the DHCP message type. 1-byte value. */
- tnet_dhcp6_message_type_t type;
- /* The transaction ID for this message exchange. 3-bytes value. */
- uint32_t transaction_id;
- /* Options carried in this message. */
- tnet_dhcp6_options_L_t *options;
-}
-tnet_dhcp6_message_t;
-
-typedef tsk_list_t tnet_dhcp6_messages_L_t;
-typedef tnet_dhcp6_message_t tnet_dhcp6_request_t;
-typedef tnet_dhcp6_message_t tnet_dhcp6_reply_t;
-
-tsk_buffer_t* tnet_dhcp6_message_serialize(const struct tnet_dhcp6_ctx_s *ctx, const tnet_dhcp6_message_t *self);
-tnet_dhcp6_message_t* tnet_dhcp6_message_deserialize(const struct tnet_dhcp6_ctx_s *ctx, const uint8_t *data, tsk_size_t size);
-
-TINYNET_API tnet_dhcp6_message_t* tnet_dhcp6_message_create(tnet_dhcp6_message_type_t type);
-TINYNET_API tnet_dhcp6_request_t* tnet_dhcp6_request_create(tnet_dhcp6_message_type_t type);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_message_def_t;
-
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP6_MESSAGE_H */
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.c b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.c
deleted file mode 100644
index 7f7aca4..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6_option.c
- * @brief DHCPv6 Options as per RFC 3315 subclause 22.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dhcp6_option.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_memory.h"
-
-#include <string.h>
-
-tnet_dhcp6_option_t* tnet_dhcp6_option_create(tnet_dhcp6_option_code_t code, const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_option_def_t, code, payload, payload_size);
-}
-
-tnet_dhcp6_option_identifier_t* tnet_dhcp6_option_indentifer_create(tnet_dhcp6_option_code_t code, const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_option_identifier_def_t, code, payload, payload_size);
-}
-
-tnet_dhcp6_option_identifier_t* tnet_dhcp6_option_clientid_create(const void* payload, tsk_size_t payload_size)
-{
- return tnet_dhcp6_option_indentifer_create(dhcp6_code_clientid, payload, payload_size);
-}
-
-tnet_dhcp6_option_identifier_t* tnet_dhcp6_option_serverid_create(const void* payload, tsk_size_t payload_size)
-{
- return tnet_dhcp6_option_indentifer_create(dhcp6_code_serverid, payload, payload_size);
-}
-
-tnet_dhcp6_option_orequest_t* tnet_dhcp6_option_orequest_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_option_orequest_def_t, payload, payload_size);
-}
-
-tnet_dhcp6_option_orequest_t* tnet_dhcp6_option_orequest_create_null()
-{
- return tnet_dhcp6_option_orequest_create(tsk_null, 0);
-}
-
-tnet_dhcp6_option_vendorclass_t* tnet_dhcp6_option_vendorclass_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dhcp6_option_vendorclass_def_t, payload, payload_size);
-}
-
-tnet_dhcp6_option_vendorclass_t* tnet_dhcp6_option_vendorclass_create_null()
-{
- return tnet_dhcp6_option_vendorclass_create(tsk_null, 0);
-}
-
-tnet_dhcp6_option_t* tnet_dhcp6_option_deserialize(const void* data, tsk_size_t size)
-{
- tnet_dhcp6_option_t *option = 0;
- uint8_t* dataPtr = ((uint8_t*)data);
- //uint8_t* dataEnd = (dataPtr+size);
-
- tnet_dhcp6_option_code_t code;
- uint16_t len;
-
- /* Check validity */
- if(!dataPtr || size<4/*Code Len*/){
- goto bail;
- }
-
- code = (tnet_dhcp6_option_code_t) tnet_ntohs_2(dataPtr);
- dataPtr += 2;
-
- len = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
-
- switch(code){
- case dhcp6_code_clientid:
- case dhcp6_code_serverid:
- {
- break;
- }
-
- default:
- {
- break;
- }
- }
-bail:
- return option;
-}
-
-int tnet_dhcp6_option_serialize(const tnet_dhcp6_option_t* self, tsk_buffer_t *output)
-{
- uint16_t _2bytes;
- int ret = -1;
-
- if(!self || !output){
- goto bail;
- }
-
- /*== Code */
- _2bytes = tnet_htons(self->code);
- tsk_buffer_append(output, &(_2bytes), 2);
-
- switch(self->code){
- case dhcp6_code_clientid:
- case dhcp6_code_serverid:
- {
- break;
- }
-
- case dhcp6_code_oro:
- default:
- {
- if(self->data)
- {
- const tnet_dhcp6_option_orequest_t* opt = (const tnet_dhcp6_option_orequest_t*)self->data;
- if(opt->codes){
- /* option-len */
- _2bytes = tnet_htons(opt->codes->size);
- tsk_buffer_append(output, &(_2bytes), 2);
- /* option-data */
- ret = tsk_buffer_append(output, opt->codes->data, opt->codes->size);
- }
-
- }
- break;
- }
- }
-bail:
- return ret;
-}
-
-int tnet_dhcp6_option_serializeex(tnet_dhcp6_option_code_t code, uint8_t length, const void* value, tsk_buffer_t *output)
-{
- return -1;
-}
-
-//
-// [[DHCPv6 OPTION]] object definition
-//
-static tsk_object_t* tnet_dhcp6_option_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_option_t *option = self;
- if(option){
- tnet_dhcp6_option_code_t code = va_arg(*app, tnet_dhcp6_option_code_t);
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- option->code = code;
- if(payload && payload_size){
- if((option->data = (tnet_dhcp6_option_data_t*)tsk_calloc(payload_size, sizeof(uint8_t)))){
- memcpy(option->data, payload, payload_size);
- option->len = payload_size;
- }
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_option_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_option_t *option = self;
- if(option){
- TSK_OBJECT_SAFE_FREE(option->data);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_option_def_s =
-{
- sizeof(tnet_dhcp6_option_t),
- tnet_dhcp6_option_ctor,
- tnet_dhcp6_option_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_option_def_t = &tnet_dhcp6_option_def_s;
-
-/*======================================================================================
-* RFC 3315 -
- 22.2. Client Identifier Option
- 22.3. Server Identifier Option
-*=======================================================================================*/
-//
-// [[DHCPv6 Option Request Option]] object definition
-//
-static tsk_object_t* tnet_dhcp6_option_identifier_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_option_identifier_t *option = self;
- if(option){
- //tnet_dhcp6_option_code_t code = va_arg(*app, tnet_dhcp6_option_code_t);
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- /* DESERIALIZATION */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_option_identifier_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_option_identifier_t *option = self;
- if(option){
- TSK_OBJECT_SAFE_FREE(option->duid);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_option_identifier_def_s =
-{
- sizeof(tnet_dhcp6_option_identifier_t),
- tnet_dhcp6_option_identifier_ctor,
- tnet_dhcp6_option_identifier_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_option_identifier_def_t = &tnet_dhcp6_option_identifier_def_s;
-
-/*======================================================================================
-* RFC 3315 - 22.7. Option Request Option
-*=======================================================================================*/
-
-int tnet_dhcp6_option_orequest_add_code(tnet_dhcp6_option_orequest_t* self, uint16_t code)
-{
- uint16_t _2bytes;
- int ret = -1;
- if(self){
- if(!self->codes){
- if(!(self->codes = tsk_buffer_create_null())){
- return -3;
- }
- }
- _2bytes = tnet_ntohs(code);
- if(!(ret = tsk_buffer_append(self->codes, &_2bytes, 2))){
- TNET_DHCP6_OPTION(self)->len += 2;
- }
- }
- return ret;
-}
-
-//
-// [[DHCPv6 Option Request Option]] object definition
-//
-static tsk_object_t* tnet_dhcp6_option_orequest_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_option_orequest_t *option = self;
- if(option){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size)
- { /* DESERIALIZATION */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_option_orequest_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_option_orequest_t *option = self;
- if(option){
- TSK_OBJECT_SAFE_FREE(option->codes);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_option_orequest_def_s =
-{
- sizeof(tnet_dhcp6_option_orequest_t),
- tnet_dhcp6_option_orequest_ctor,
- tnet_dhcp6_option_orequest_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_option_orequest_def_t = &tnet_dhcp6_option_orequest_def_s;
-
-/*======================================================================================
-* RFC 3315 - 22.16. Vendor Class Option
-*=======================================================================================*/
-
-//
-// [[DHCPv6 Option Request Option]] object definition
-//
-static tsk_object_t* tnet_dhcp6_option_vendorclass_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dhcp6_option_vendorclass_t *option = self;
- if(option){
- const void* payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- /* DESERIALIZATION */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dhcp6_option_vendorclass_dtor(tsk_object_t * self)
-{
- tnet_dhcp6_option_vendorclass_t *option = self;
- if(option){
- TSK_OBJECT_SAFE_FREE(option->vendor_class_data);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dhcp6_option_vendorclass_def_s =
-{
- sizeof(tnet_dhcp6_option_vendorclass_t),
- tnet_dhcp6_option_vendorclass_ctor,
- tnet_dhcp6_option_vendorclass_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dhcp6_option_vendorclass_def_t = &tnet_dhcp6_option_vendorclass_def_s;
diff --git a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.h b/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.h
deleted file mode 100644
index efa843f..0000000
--- a/branches/1.0/tinyNET/src/dhcp6/tnet_dhcp6_option.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dhcp6_option.h
- * @brief DHCPv6 Options as per RFC 3315 subclause 22.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DHCP6_OPTION_H
-#define TNET_DHCP6_OPTION_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dhcp6_duid.h"
-
-#include "tsk_list.h"
-#include "tsk_buffer.h"
-
-TNET_BEGIN_DECLS
-
-#define TNET_DHCP6_OPTION(self) ((tnet_dhcp6_option_t*)(self))
-
-/** List of DHCPv6 option as registered by IANA (RFC 3315 subcaluse 24.3)*/
-typedef enum tnet_dhcp6_option_code_e
-{
- dhcp6_code_clientid = 1, /**< Client Identifier Option. */
- dhcp6_code_serverid = 2, /**< Server Identifier Option. */
- dhcp6_code_ia_na = 3, /**< Identity Association for Non-temporary Addresses Option. */
- dhcp6_code_ia_ta = 4, /**< Identity Association for Temporary Addresses Option. */
- dhcp6_code_iaaddr = 5, /**< IA Address Option. */
- dhcp6_code_oro = 6, /**< Option Request Option. */
- dhcp6_code_preference = 7, /**< Preference Option. */
- dhcp6_code_elapsed_time = 8, /**< Elapsed Time Option. */
- dhcp6_code_relay_msg = 9, /**< Relay Message Option. */
- dhcp6_code_auth = 11, /**< Authentication Option. */
- dhcp6_code_unicast = 12, /**< Server Unicast Option. */
- dhcp6_code_status_code = 13, /**< Status Code Option. */
- dhcp6_code_rapid_commit = 14, /**< Rapid Commit Option. */
- dhcp6_code_user_class = 15, /**< User Class Option. */
- dhcp6_code_vendor_class = 16, /**< Vendor Class Option. */
- dhcp6_code_vendor_opts = 17, /**< Vendor-specific Information Option. */
- dhcp6_code_interface_id = 18, /**< Interface-Id Option. */
- dhcp6_code_reconf_msg = 19, /**< Reconfigure Message Option. */
- dhcp6_code_reconf_accept = 20, /**< Reconfigure Accept Option. */
-}
-tnet_dhcp6_option_code_t;
-
-/** List of DHCPv6 status codes as registered by IANA (RFC 3315 subclause 24.4) */
-typedef enum tnet_dhcp6_statuscode_e
-{
- /* Success */
- dhcp6_statuscode_Success = 0,
- /* Failure, reason unspecified; this status code is sent by either a client
- or a server to indicate a failure not explicitly specified in this document (RFC 3315). */
- dhcp6_statuscode_UnspecFail = 1,
- /* Server has no addresses available to assign to the IA(s). */
- dhcp6_statuscode_NoAddrsAvail = 2,
- /* Client record (binding) unavailable. */
- dhcp6_statuscode_NoBinding = 3,
- /* The prefix for the address is not appropriate for the link to which the client is attached. */
- dhcp6_statuscode_NotOnLink = 4,
- /* Sent by a server to a client to force the client to send messages to the server.
- using the All_DHCP_Relay_Agents_and_Servers address.*/
- dhcp6_statuscode_UseMulticast = 5
-}
-tnet_dhcp6_statuscode_t;
-
-/*=======================================================================================
-* RFC 3315 - 22.1. Format of DHCP Options
-*=======================================================================================*/
-
-/**@ingroup tnet_dhcpv_group
-* DHCPv6 option-data.
-*/
-typedef struct tnet_dhcp6_option_data_s
-{
- TSK_DECLARE_OBJECT;
-}
-tnet_dhcp6_option_data_t;
-#define TNET_DECLARE_DHCP6_OPTION_DATA tnet_dhcp6_option_data_t dhcp6_option_data
-
-typedef struct tnet_dhcp6_option_s
-{
- TSK_DECLARE_OBJECT;
-
- /* RFC 3315 - 22.1. Format of DHCP Options
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | option-code(2) | option-len(2) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | option-data |
- | (option-len octets) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
-
- /* An unsigned integer identifying the specific option type carried in this option.*/
- tnet_dhcp6_option_code_t code;
- /* Option length. Same as tsk_strlen(data buffer)*/
- uint16_t len;
- /* opton-data */
- tnet_dhcp6_option_data_t *data;
-}
-tnet_dhcp6_option_t;
-
-typedef tsk_list_t tnet_dhcp6_options_L_t;
-
-#define TNET_DECLARE_DHCP6_OPTION tnet_dhcp6_option_t dhcp6_option
-
-tnet_dhcp6_option_t* tnet_dhcp6_option_deserialize(const void* data, tsk_size_t size);
-int tnet_dhcp6_option_serialize(const tnet_dhcp6_option_t* self, tsk_buffer_t *output);
-int tnet_dhcp6_option_serializeex(tnet_dhcp6_option_code_t code, uint8_t length, const void* value, tsk_buffer_t *output);
-
-
-
-
-/*======================================================================================
-* RFC 3315 -
- 22.2. Client Identifier Option
- 22.3. Server Identifier Option
-*=======================================================================================*/
-/** DHCPv6 Client /server Identifier Option (subclause 22.2 and 22.3).
-*/
-typedef struct tnet_dhcp6_option_identifier_s
-{
- TNET_DECLARE_DHCP6_OPTION_DATA;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | OPTION_XXXXXXID | option-len |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . .
- . DUID .
- . (variable length) .
- . .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- OPTION_XXXXXXID = OPTION_CLIENTID or OPTION_SERVERID
- */
- tnet_dhcp6_duid_t *duid;
-}
-tnet_dhcp6_option_identifier_t;
-typedef tnet_dhcp6_option_identifier_t tnet_dhcp6_option_clientid_t;
-typedef tnet_dhcp6_option_identifier_t tnet_dhcp6_option_serverid_t;
-
-
-/*======================================================================================
-* RFC 3315 - 22.4. Identity Association for Non-temporary Addresses Option
-*=======================================================================================*/
-
-/*======================================================================================
-* RFC 3315 - 22.7. Option Request Option
-*=======================================================================================*/
-
-/** DHCPv6 Option Request Option (subclause 22.7).
-*/
-typedef struct tnet_dhcp6_option_orequest_s
-{
- TNET_DECLARE_DHCP6_OPTION_DATA;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | OPTION_ORO | option-len |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | requested-option-code-1 | requested-option-code-2 |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | ... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- tsk_buffer_t* codes;
-}
-tnet_dhcp6_option_orequest_t;
-
-TINYNET_API int tnet_dhcp6_option_orequest_add_code(tnet_dhcp6_option_orequest_t* self, uint16_t code);
-
-/*======================================================================================
-* RFC 3315 - 22.16. Vendor Class Option
-*=======================================================================================*/
-
-/** DHCPv6 Vendor Class Option (subclause 22.16).
-*/
-typedef struct tnet_dhcp6_option_vendorclass_s
-{
- TNET_DECLARE_DHCP6_OPTION_DATA;
- /*
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | OPTION_VENDOR_CLASS | option-len |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | enterprise-number |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- . .
- . vendor-class-data .
- . . . . .
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- uint32_t enterprise_number;
- /*
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...-+-+-+-+-+-+-+
- | vendor-class-len | opaque-data |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...-+-+-+-+-+-+-+
- */
- tsk_buffer_t* vendor_class_data;
-}
-tnet_dhcp6_option_vendorclass_t;
-
-
-TINYNET_API tnet_dhcp6_option_t* tnet_dhcp6_option_create(tnet_dhcp6_option_code_t code, const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_option_identifier_t* tnet_dhcp6_option_indentifer_create(tnet_dhcp6_option_code_t code, const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_option_identifier_t* tnet_dhcp6_option_clientid_create(const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_option_identifier_t* tnet_dhcp6_option_serverid_create(const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_option_orequest_t* tnet_dhcp6_option_orequest_create(const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_option_orequest_t* tnet_dhcp6_option_orequest_create_null();
-TINYNET_API tnet_dhcp6_option_vendorclass_t* tnet_dhcp6_option_vendorclass_create(const void* payload, tsk_size_t payload_size);
-TINYNET_API tnet_dhcp6_option_vendorclass_t* tnet_dhcp6_option_vendorclass_create_null();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_option_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_option_identifier_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_option_orequest_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dhcp6_option_vendorclass_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DHCP6_OPTION_H */
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns.c b/branches/1.0/tinyNET/src/dns/tnet_dns.c
deleted file mode 100644
index 0683cbb..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns.c
+++ /dev/null
@@ -1,973 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns.c
- * @brief DNS utility functions (RFCS [1034 1035] [3401 3402 3403 3404] [3761]).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns.h"
-
-#include "tnet_dns_regexp.h"
-#include "tnet_dns_message.h"
-#include "tnet_dns_opt.h"
-#include "tnet_dns_srv.h"
-#include "tnet_dns_naptr.h"
-
-#include "tnet_types.h"
-
-#include "tsk_memory.h"
-#include "tsk_time.h"
-#include "tsk_debug.h"
-#include "tsk_string.h"
-
-#include <string.h> /* tsk_strlen, memser, .... */
-#include <ctype.h> /* isdigist */
-
-/* DNS cache functions */
-int tnet_dns_cache_maintenance(tnet_dns_ctx_t *ctx);
-int tnet_dns_cache_entry_add(tnet_dns_ctx_t *ctx, const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tnet_dns_response_t* response);
-const tnet_dns_cache_entry_t* tnet_dns_cache_entry_get(tnet_dns_ctx_t *ctx, const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype);
-
-/**@defgroup tnet_dns_group DNS utility functions (RFCS [1034 1035] [3401 3402 3403 3404]).
-*
-* <h1>11 DNS</h1>
-* <p>
-* The DNS Stack (RFC 1034 and RFC 1035) contains all network functions to send queries (both IPv4 and IPv6) and parse responses. <br>
-* The core framework implements RFC 3401, 3402, 3403 and 3404, also known as Dynamic Delegation Discovery System (DDDS).
-* </p>
-* <p>
-* The DNS servers are automatically loaded by the stack when you create a context (@ref tnet_dns_ctx_create()). <br>
-* On Windows systems (XP, VISTA, 7 and CE) the servers are retrieved using WIN32 APIs. On Unix-like systems (both desktop and embedded) such as Debian, Ubuntu, Nokia’s N900… the list of DNS servers comes from “/etc/resolv.conf” file. <br>
-* On Google Android operating system, this file is missing and the DNS settings are stored in the shared memory. You can access this shared memory by using @a property_get() and @a property_set() function which are part of Bionic. <br>
-* In all cases, you can retrieve the DNS servers yourself (e.g. using java/C# Frameworks) and add them to the context using @ref tnet_dns_add_server().
-* </p>
-* <p>
-* DNS resolution is always performed in a synchronous manner and is thread-safe. For all DNS requests the default timeout value is 5 seconds (@ref TNET_DNS_TIMEOUT_DEFAULT).
-* The stack also implements the ENUM protocol (RFC 3761).
-* </p>
-*
-* <h2>11.1 Resource Records</h2>
-* The table below lists all DNS Resource Records (RR) for which we provide a parser.
-*
-* <table>
-* <tr><td>Code</td> <td>RFC</td> <td>Description</td> <td>Well-defined type</td></tr>
-* <tr><td>A</td> <td>RFC 1035</td> <td>IPv4 address</td> <td>tnet_dns_a_t</td></tr>
-* <tr><td>AAAA</td> <td>RFC 3596</td> <td>IPv6 address</td> <td>tnet_dns_aaaa_t</td></tr>
-* <tr><td>CNAME</td> <td>RFC 1035</td> <td>Canonical name</td> <td>tnet_dns_cname_t</td></tr>
-* <tr><td>MX</td> <td>RFC 2035</td> <td>Mail exchange</td> <td>tnet_dns_mx_t</td></tr>
-* <tr><td>NAPTR</td> <td>RFC 3403</td> <td>Naming Authority Pointer</td> <td>tnet_dns_naptr_t</td></tr>
-* <tr><td>NS</td> <td>RFC 1035</td> <td>Name Server</td> <td>tnet_dns_ns_t</td></tr>
-* <tr><td>OPT</td> <td>RFC 2671</td> <td>Option</td> <td>tnet_dns_opt_t</td></tr>
-* <tr><td>PTR</td> <td>RFC 1035</td> <td>Pointer record</td> <td>tnet_dns_ptr_t</td></tr>
-* <tr><td>SOA</td> <td>RFC1035</td> <td>Start Of Authority record</td> <td>tnet_dns_soa_t</td></tr>
-* <tr><td>SRV</td> <td>RFC 2782</td> <td>Service locator</td> <td>tnet_dns_srv_t</td></tr>
-* </table>
-*
-* Here is an example of how to use the DNS stack to perform DNS NAPTR resolution and print the result to the console.
-*
-* @code
-tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
-tnet_dns_response_t *response = tsk_null;
-const tsk_list_item_t* item;
-const tnet_dns_rr_t* rr;
-
-if((response = tnet_dns_resolve(ctx, "sip2sip.info", qclass_in, qtype_naptr)))
-{
- if(TNET_DNS_RESPONSE_IS_SUCCESS(response)){
- TSK_DEBUG_INFO("We got a success response from the DNS server.");
- // loop through the answers
- tsk_list_foreach(item, response->Answers){
- rr = item->data;
- if(rr->qtype == qtype_naptr){
- const tnet_dns_naptr_t *naptr = (const tnet_dns_naptr_t*)rr;
-
- TSK_DEBUG_INFO("order=%u pref=%u flags=%s services=%s regexp=%s replacement=%s",
- naptr->order,
- naptr->preference,
- naptr->flags,
- naptr->services,
- naptr->regexp,
- naptr->replacement);
- }
- }
- }
- else{
- TSK_DEBUG_ERROR("We got an error response from the DNS server. Error code: %u", response->Header.RCODE);
- }
-}
-
-TSK_OBJECT_SAFE_FREE(response);
-TSK_OBJECT_SAFE_FREE(ctx);
-
-* @endcode
-* The @a ctx could be used several times and is a well-defined object.<br>
-* The console will output:
-* <i>INFO: We got a success response from the DNS server.</i><br>
-* <i>INFO: order=10 pref=0 flags=S services=SIP+d2u regexp=(null) replacement=_sip._udp.sip2sip.info</i><br>
-*
-* <h2>11.2 ENUM</h2>
-* ENUM (E.164 Number Mapping) protocol has been defined in RFC 3761.
-* ENUM protocol is used to transform telephone numbers of the PSTN network (e.g. +33600000) into internet resource addresses (e.g. sip:diopmamadou@example.com) by using DNS lookup (NAPTR). The internet resource address could be an email, ICQ, IAX2, H.323 …
-* In our case (3GPP IMS) it is typically used to convert TEL URIs (e.g. tel:+33600000) into SIP URIs (sip:+33600000;user=phone). The telephone number to convert should be a valid E.164 number.
-*
-* <h3>11.2.1 Usage</h3>
-* The code below shows how to gets the SIP address (with the higher order) associated to an E.164 telephone number.
-*
-* @code
-tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
-tnet_dns_response_t* response = tsk_null;
-char* uri = tsk_null;
-
-if((uri = tnet_dns_enum_2(ctx, "E2U+SIP", "+1-800-555-5555","e164.org"))){
- TSK_DEBUG_INFO("URI=%s", uri);
- TSK_FREE(uri);
-}
-else{
- TSK_DEBUG_ERROR("ENUM(%s) failed", "+1-800-555-5555");
-}
-
-TSK_OBJECT_SAFE_FREE(response);
-TSK_OBJECT_SAFE_FREE(ctx);
-* @endcode
-*
-* Console Output:<br>
-* <i>INFO: URI=sip:16416418000-555-5555@sip.tollfreegateway.com</i><br>
-*
-* E2U+SIP is the name of SIP ENUM service assigned by the IANA. Any assigned service () could be used even if the associated addresse type isn’t a well-knonw internet address.
-* To get all internet addresses (email, IAX2, ICQ, H.323 …) associated to the telephone, use @ref tnet_dns_enum() instead of @ref tnet_dns_enum_2().
-*/
-
-/**@ingroup tnet_dns_group
-* Creates new DNS context.
-*/
-tnet_dns_ctx_t* tnet_dns_ctx_create()
-{
- return tsk_object_new(tnet_dns_ctx_def_t);
-}
-
-/**@ingroup tnet_dns_group
-* Creates new DNS cache entry.
-*/
-tnet_dns_cache_entry_t* tnet_dns_cache_entry_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tnet_dns_response_t* answer)
-{
- return tsk_object_new(tnet_dns_cache_entry_def_t, qname, qclass, qtype, answer);
-}
-
-
-/**@ingroup tnet_dns_group
-* Cleanup the internal DNS cache.
-* @param ctx The DNS context containing the cache to cleanup.
-* The context contains the user's preference and should be created using @ref tnet_dns_ctx_create().
-* @retval Zero if succeeed and non-zero error code otherwise.
-*/
-int tnet_dns_cache_clear(tnet_dns_ctx_t* ctx)
-{
- if(ctx){
- tsk_safeobj_lock(ctx);
- tsk_list_clear_items(ctx->cache);
- tsk_safeobj_unlock(ctx);
-
- return 0;
- }
- return -1;
-}
-
-/**@ingroup tnet_dns_group
-* Sends DNS request over the network. The request will be sent each 500 milliseconds until @ref TNET_DNS_TIMEOUT_DEFAULT milliseconds is reached.
-* @param ctx The DNS context to use. The context contains the user's preference and should be created using @ref tnet_dns_ctx_create().
-* @param qname The domain name (e.g. google.com).
-* @param qclass The CLASS of the query.
-* @param qtype The type of the query.
-* @retval The DNS response. The @a answers in the @a response are already filtered.
-* MUST be destroyed using @a TSK_OBJECT_SAFE_FREE() macro.
-* @sa @ref tnet_dns_query_srv, @ref tnet_dns_query_naptr_srv, @ref tnet_dns_enum.
-*
-* @code
-* tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
-* tnet_dns_response_t *response = tnet_dns_resolve(ctx, "sip2sip.info", qclass_in, qtype_srv);
-* TSK_OBJECT_SAFE_FREE(response);
-* TSK_OBJECT_SAFE_FREE(ctx);
-* @endcode
-*/
-tnet_dns_response_t *tnet_dns_resolve(tnet_dns_ctx_t* ctx, const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)
-{
-#if HAVE_DNS_H
- struct sockaddr_storage result;
- struct sockaddr *from;
- uint32_t fromlen;
- char buf[TNET_DNS_DGRAM_SIZE_DEFAULT];
- int32_t ret;
-
- tnet_dns_response_t *response = tsk_null;
-
- tnet_socket_t *localsocket4 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, tnet_socket_type_udp_ipv4);
- tnet_socket_t *localsocket6 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, tnet_socket_type_udp_ipv6);
-
- tsk_safeobj_lock(ctx);
-
- // First, try with IPv4
- if(TNET_SOCKET_IS_VALID(localsocket4)){
- if((ret = tnet_get_sockaddr(localsocket4->fd, &result))){
- TNET_PRINT_LAST_ERROR("tnet_get_sockaddr() failed.");
- goto ipv6;
- }
- from = (struct sockaddr *) &result;
- fromlen = from->sa_len;
-
- if ((ret = dns_search(ctx->resolv_handle, qname, qclass, qtype, buf, TNET_DNS_DGRAM_SIZE_DEFAULT, from, &fromlen)) > 0) {
- response = tnet_dns_message_deserialize((uint8_t *) buf, ret);
- goto done;
- }
- else{
- TNET_PRINT_LAST_ERROR("dns_search_v4()");
- }
- }
-ipv6:
- // Then, try with IPv6
- if(TNET_SOCKET_IS_VALID(localsocket6)){
- if((ret = tnet_get_sockaddr(localsocket6->fd, &result))){
- TNET_PRINT_LAST_ERROR("tnet_get_sockaddr() failed.");
- goto done;
- }
- from = (struct sockaddr *) &result;
- fromlen = from->sa_len;
-
- if((ret = dns_search(ctx->resolv_handle, qname, qclass, qtype, buf, TNET_DNS_DGRAM_SIZE_DEFAULT, from, &fromlen)) > 0){
- response = tnet_dns_message_deserialize((uint8_t *) buf, ret);
- goto done;
- }
- else{
- TNET_PRINT_LAST_ERROR("dns_search_v6()");
- }
- }
-
-done:
- tsk_safeobj_unlock(ctx);
-
- TSK_OBJECT_SAFE_FREE(localsocket4);
- TSK_OBJECT_SAFE_FREE(localsocket6);
-
- return response;
-#else
- tsk_buffer_t *output = tsk_null;
- tnet_dns_query_t* query = tnet_dns_query_create(qname, qclass, qtype);
- tnet_dns_response_t *response = tsk_null;
- tsk_bool_t from_cache = tsk_false;
-
- /* Check validity */
- if(!ctx || !query){
- goto bail;
- }
-
- /* Is there any DNS Server? */
- if(TSK_LIST_IS_EMPTY(ctx->servers)){
- TSK_DEBUG_ERROR("Failed to load DNS Servers. You can add new DNS servers by using \"tnet_dns_add_server\".");
- goto bail;
- }
-
- /* Cache maintenance */
- if(!TSK_LIST_IS_EMPTY(ctx->cache)){
- /* Only do maintenance if the cache is not empty */
- tnet_dns_cache_maintenance(ctx);
- }
-
- /* Retrieve data from cache. */
- if(ctx->caching){
- const tnet_dns_cache_entry_t *entry = tnet_dns_cache_entry_get(ctx, qname, qclass, qtype);
- if(entry){
- response = tsk_object_ref(((tnet_dns_cache_entry_t*)entry)->response);
- from_cache = tsk_true;
- goto bail;
- }
- }
-
- /* Set user preference */
- query->Header.RD = ctx->recursion;
-
- /* EDNS0 */
- if(ctx->edns0){
- tnet_dns_opt_t *rr_opt = tnet_dns_opt_create(TNET_DNS_DGRAM_SIZE_DEFAULT);
- if(!query->Additionals){
- query->Additionals = tsk_list_create();
- }
- tsk_list_push_back_data(query->Additionals, (void**)&rr_opt);
- query->Header.ARCOUNT++;
- }
-
- /* Serialize and send to the server. */
- if(!(output = tnet_dns_message_serialize(query))){
- TSK_DEBUG_ERROR("Failed to serialize the DNS message.");
- goto bail;
- }
-
- /* ============================ */
- // Send and Recaive data
- /* ============================ */
- {
- int ret = -1;
- struct timeval tv;
- fd_set set;
- tnet_fd_t maxFD;
- uint64_t timeout = 0;
- tsk_list_item_t *item;
- const tnet_address_t *address;
- struct sockaddr_storage server;
- tnet_socket_t *localsocket4 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, tnet_socket_type_udp_ipv4);
- tnet_socket_t *localsocket6 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, tnet_socket_type_udp_ipv6);
- tsk_bool_t useIPv6 = TNET_SOCKET_IS_VALID(localsocket6);
-
- tsk_safeobj_lock(ctx);
-
- /* Check socket validity */
- if(!TNET_SOCKET_IS_VALID(localsocket4)){
- goto done;
- }
-
- /* Always wait 500ms before retransmission */
- tv.tv_sec = 0;
- tv.tv_usec = (500 * 1000);
-
- do
- {
- //
- // Send data (loop through all intefaces)
- //
- tsk_list_foreach(item, ctx->servers)
- {
- address = item->data;
- if(!address->ip ||
- (address->family != AF_INET && address->family != AF_INET6) ||
- (address->family == AF_INET6 && !TNET_SOCKET_IS_VALID(localsocket6))){
- continue;
- }
-
- if(tnet_sockaddr_init(address->ip, ctx->server_port, (address->family == AF_INET ? tnet_socket_type_udp_ipv4 : tnet_socket_type_udp_ipv6), &server)){
- TSK_DEBUG_ERROR("Failed to initialize the DNS server address: \"%s\"", address->ip);
- continue;
- }
-
- TSK_DEBUG_INFO("Sending DNS query to \"%s\"", address->ip);
-
- if(address->family == AF_INET6){
- if((ret = tnet_sockfd_sendto(localsocket6->fd, (const struct sockaddr*)&server, output->data, output->size))){
- // succeed?
- break;
- }
- }
- else{
- if((ret = tnet_sockfd_sendto(localsocket4->fd, (const struct sockaddr*)&server, output->data, output->size))){
- // succeed?
- break;
- }
- }
- }
-
- //
- // Received data
- //
- /* First time? ==> set timeout value */
- if(!timeout){
- timeout = tsk_time_epoch() + ctx->timeout;
- }
-
- /* Set FDs */
- FD_ZERO(&set);
- FD_SET(localsocket4->fd, &set);
- if(useIPv6){
- FD_SET(localsocket6->fd, &set);
- maxFD = TSK_MAX(localsocket4->fd, localsocket6->fd);
- }
- else{
- maxFD = localsocket4->fd;
- }
-
- /* wait for response */
- if((ret = select(maxFD+1, &set, NULL, NULL, &tv))<0){ /* Error */
- TNET_PRINT_LAST_ERROR("Select failed.");
- goto done;
- }
- else if(ret == 0){ /* timeout ==> do nothing */
-
- }
- else{ /* there is data to read */
- tsk_size_t len = 0;
- void* data = 0;
- tnet_fd_t active_fd;
-
- /* Find active file descriptor */
- if(FD_ISSET(localsocket4->fd, &set)){
- active_fd = localsocket4->fd;
- }
- else if(FD_ISSET(localsocket6->fd, &set)){
- active_fd = localsocket4->fd;
- }
- else{
- TSK_DEBUG_ERROR("FD_ISSET ==> Invalid file descriptor.");
- continue;
- }
-
- /* Check how how many bytes are pending */
- if((ret = tnet_ioctlt(active_fd, FIONREAD, &len))<0){
- TSK_DEBUG_ERROR("tnet_ioctlt failed with error code:%d", tnet_geterrno());
- goto done;
- }
-
- /* Receive pending data */
- data = tsk_calloc(len, sizeof(uint8_t));
- if((ret = tnet_sockfd_recv(active_fd, data, len, 0))<0){
- TSK_FREE(data);
-
- TSK_DEBUG_ERROR("tnet_sockfd_recv failed with error code:%d", tnet_geterrno());
- goto done;
- }
-
- /* Parse the incoming response. */
- response = tnet_dns_message_deserialize(data, (tsk_size_t)ret);
- TSK_FREE(data);
-
- if(response)
- { /* response successfuly parsed */
- if(query->Header.ID != response->Header.ID || !TNET_DNS_MESSAGE_IS_RESPONSE(response)){
- /* Not same transaction id ==> continue*/
- TSK_OBJECT_SAFE_FREE(response);
- }
- else goto done;
- }
- }
- }
- while(timeout > tsk_time_epoch());
-
-done:
- tsk_safeobj_unlock(ctx);
-
- TSK_OBJECT_SAFE_FREE(localsocket4);
- TSK_OBJECT_SAFE_FREE(localsocket6);
- goto bail;
- }
-
-
-bail:
- TSK_OBJECT_SAFE_FREE(query);
- TSK_OBJECT_SAFE_FREE(output);
-
- /* Add the result to the cache. */
- if(response){
- if(!from_cache && ctx->caching){
- tnet_dns_cache_entry_add(ctx, qname, qclass, qtype, response);
- }
- }
- else{
- TSK_DEBUG_ERROR("Failed to contact the DNS server.");
- }
-
- return response;
-#endif
-}
-
-/**@ingroup tnet_dns_group
-* Gets list of URIs associated to this telephone number by using ENUM protocol (RFC 3761).
-* @param ctx The DNS context.
-* The context contains the user's preference and should be created using @ref tnet_dns_ctx_create().
-* @param e164num A valid E.164 number (e.g. +1-800-555-5555).
-* @param domain The domain name (e.g e164.arpa, e164.org, ...). If Null, default value is "e164.arpa" (IANA).
-* @retval The DNS response with NAPTR RRs. The @a answers in the @a response are already filtered.
-* MUST be destroyed using @a TSK_OBJECT_SAFE_FREE macro.
-* @sa @ref tnet_dns_resolve, @ref tnet_dns_enum_2.
-*/
-tnet_dns_response_t* tnet_dns_enum(tnet_dns_ctx_t* ctx, const char* e164num, const char* domain)
-{
- char e164domain[255];
- tnet_dns_response_t* ret = tsk_null;
- tsk_size_t e164size;
- int i, j; // must be signed
-
- e164size = tsk_strlen(e164num);
-
- if(!ctx || !e164num || !e164size){
- goto bail;
- }
-
- if(e164size /* max=15 digits + ".e164.arpa" + '+' */>=(sizeof(e164domain)-1)){
- TSK_DEBUG_ERROR("%s is an invalid E.164 number.", e164num);
- goto bail;
- }
-
- memset(e164domain, '\0', sizeof(e164domain));
-
- /* RFC 3761 - 2.4. Valid Databases
- 1. Remove all characters with the exception of the digits. For
- example, the First Well Known Rule produced the Key
- "+442079460148". This step would simply remove the leading "+",
- producing "442079460148".
-
- 2. Put dots (".") between each digit. Example:
- 4.4.2.0.7.9.4.6.0.1.4.8
-
- 3. Reverse the order of the digits. Example:
- 8.4.1.0.6.4.9.7.0.2.4.4
-
- 4. Append the string ".e164.arpa" to the end. Example:
- 8.4.1.0.6.4.9.7.0.2.4.4.e164.arpa
-
- This domain-name is used to request NAPTR records which may contain
- the end result or, if the flags field is blank, produces new keys in
- the form of domain-names from the DNS.
- */
- for(i = e164size-1, j=0; i>=0; i--){
- if(!isdigit(e164num[i])){
- continue;
- }
- e164domain[j++] = e164num[i];
- e164domain[j++] = '.';
- }
-
- // append domain name
- if(domain){
- memcpy( &e164domain[j], domain, ((tsk_strlen(domain) + j) >= sizeof(e164domain)-1) ? (sizeof(e164domain)-j-1) : tsk_strlen(domain) );
- }
- else{
- memcpy(&e164domain[j], "e164.arpa", 9);
- }
-
- /* == Performs DNS (NAPTR) lookup == */
- ret = tnet_dns_resolve(ctx, e164domain, qclass_in, qtype_naptr);
-
-bail:
-
- return ret;
-}
-
-/**@ingroup tnet_dns_group
-* Gets the internate address associated to this telephone number by using ENUM protocol (RFC 3761).
-* Only terminale rules containing uris(flags="u") will be considered and the regex string will be executed on the original string for
-* substitution. <br>
-* <b> Parsing complex regexp will probably fail (99.99% chance). Please use @ref tnet_dns_enum if you want to use your own regexp parser. </b>
-* @param ctx The DNS context.
-* The context contains the user's preference and should be created using @ref tnet_dns_ctx_create().
-* @param service The ENUM service (e.g. E2U+SIP).
-* @param e164num A valid E.164 number (e.g. +1-800-555-5555).
-* @param domain The domain name (e.g e164.arpa, e164.org, ...). If Null, default value is "e164.arpa" (IANA).
-* @retval The Internet address (SIP, email, ICQ, fax, ...) associated to this service.
-* MUST be freed using @a TSK_FREE macro.
-* @sa @ref tnet_dns_resolve, @ref tnet_dns_enum.
-*/
-char* tnet_dns_enum_2(tnet_dns_ctx_t* ctx, const char* service, const char* e164num, const char* domain)
-{
- tnet_dns_response_t* response;
- const tsk_list_item_t* item;
- char* ret = tsk_null;
- const tnet_dns_rr_t* rr;
-
- if((response = tnet_dns_enum(ctx, e164num, domain))){
- if(TNET_DNS_RESPONSE_IS_SUCCESS(response)){
- tsk_list_foreach(item, response->Answers){
- rr = item->data;
- if(rr->qtype == qtype_naptr){
- const tnet_dns_naptr_t *naptr = (const tnet_dns_naptr_t*)rr;
- /* RFC 3403 - 6.2 E164 Example
- Both the ENUM [18] and URI Resolution [4] Applications use the 'u'
- flag. This flag states that the Rule is terminal and that the output
- is a URI which contains the information needed to contact that
- telephone service.
- */
- if( tsk_striequals(naptr->flags, "u") && tsk_striequals(naptr->services, service)){
- /* RFC 3403 - 4.1 Packet Format
- The fields (replacement and regexp) are also mutually exclusive. If a record is
- returned that has values for both fields then it is considered to
- be in error and SHOULD be either ignored or an error returned.
- */
- if(naptr->regexp && naptr->replacement){
- continue;
- }
-
- if((ret = tnet_dns_regex_parse(e164num, naptr->regexp))){
- break;
- }
- }
- }
- }
- }
- else{
- TSK_DEBUG_ERROR("We got an error response from the DNS server. Error code: %u", response->Header.RCODE);
- }
-
- TSK_OBJECT_SAFE_FREE(response);
- }
-
- return ret;
-}
-
-/**@ingroup tnet_dns_group
-* Performs DNS SRV resolution.
-* @param ctx The DNS context.
-* The context contains the user's preference and should be created using @ref tnet_dns_ctx_create.
-* @param service The name of the service (e.g. SIP+D2U).
-* @param hostname The result containing an IP address or FQDN.
-* @param port The port associated to the result.
-* @retval Zero if succeed and non-zero error code otherwise.
-* @sa @ref tnet_dns_resolve.
-*
-* @code
-* tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
-* char* hostname = 0;
-* tnet_port_t port = 0;
-*
-* if(!tnet_dns_query_srv(ctx, "_sip._udp.sip2sip.info", &hostname, &port)){
-* TSK_DEBUG_INFO("DNS SRV succeed ==> hostname=%s and port=%u", hostname, port);
-* }
-*
-* TSK_FREE(hostname);
-* TSK_OBJECT_SAFE_FREE(ctx);
-* @endcode
-*/
-int tnet_dns_query_srv(tnet_dns_ctx_t *ctx, const char* service, char** hostname, tnet_port_t* port)
-{
- tnet_dns_response_t *response;
-
- if(!ctx){
- return -1;
- }
-
- // tnet_dns_resolve is thread-safe
- if((response = tnet_dns_resolve(ctx, service, qclass_in, qtype_srv)))
- {
- const tsk_list_item_t *item;
- const tnet_dns_rr_t* rr;
- tsk_list_foreach(item, response->Answers) /* Already Filtered ==> Peek the first One */
- {
- rr = item->data;
- if(rr->qtype == qtype_srv){
- const tnet_dns_srv_t *srv = (const tnet_dns_srv_t*)rr;
-
- tsk_strupdate(hostname, srv->target);
- *port = srv->port;
- break;
- }
- }
- }
-
- TSK_OBJECT_SAFE_FREE(response);
-
- return (hostname && !tsk_strnullORempty(*hostname)) ? 0 : -2;
-}
-
-/**@ingroup tnet_dns_group
-* Performs DNS NAPTR followed by DNS SRV resolution.
-* @param ctx The DNS context.
-* The context contains the user's preference and should be created using @ref tnet_dns_ctx_create().
-* @param domain The Name of the domain (e.g. google.com).
-* @param service The name of the service (e.g. SIP+D2U).
-* @param hostname The result containing an IP address or FQDN. Should be Null.
-* @param port The port associated to the result.
-* @retval Zero if succeed and non-zero error code otherwise.
-* @sa @ref tnet_dns_resolve.
-*
-* @code
-* tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
-* char* hostname = tsk_null;
-* tnet_port_t port = 0;
-*
-* if(!tnet_dns_query_naptr_srv(ctx, "sip2sip.info", "SIP+D2U", &hostname, &port)){
-* TSK_DEBUG_INFO("DNS NAPTR+SRV succeed ==> hostname=%s and port=%u", hostname, port);
-* }
-*
-* TSK_FREE(hostname);
-* TSK_OBJECT_SAFE_FREE(ctx);
-* @endcode
-*/
-int tnet_dns_query_naptr_srv(tnet_dns_ctx_t *ctx, const char* domain, const char* service, char** hostname, tnet_port_t* port)
-{
- tnet_dns_response_t *response;
-
- if(!ctx || !hostname){
- TSK_DEBUG_ERROR("Invalid parameters.");
- return -1;
- }
-
- /* reset (do not free the user supplied value). trying to free dummy value will cause access violation error ==> zero. */
- *hostname = tsk_null;
-
- // tnet_dns_resolve is thread-safe
- if((response = tnet_dns_resolve(ctx, domain, qclass_in, qtype_naptr))){
- const tsk_list_item_t *item;
- const tnet_dns_rr_t* rr;
-
- char* replacement = tsk_null; /* e.g. _sip._udp.example.com */
- char* flags = tsk_null;/* e.g. S, A, AAAA, A6, U, P ... */
-
- tsk_list_foreach(item, response->Answers) /* Already Filtered ==> Peek the first One */
- {
- rr = item->data;
- if(rr->qtype == qtype_naptr){
- tnet_dns_naptr_t *naptr = (tnet_dns_naptr_t*)rr;
-
- if(tsk_striequals(service, naptr->services)){
- tsk_strupdate(&replacement, naptr->replacement);
- tsk_strupdate(&flags, naptr->flags);
-
- break;
- }
- }
- }
-
- if(flags && replacement){
- if(tsk_striequals(flags, "S")){
- tnet_dns_query_srv(ctx, replacement, hostname, port);
- }
- else if(tsk_striequals(flags, "A") || tsk_striequals(flags, "AAAA") ||tsk_striequals(flags, "A6")){
- TSK_DEBUG_WARN("Defaulting port value.");
- tsk_strupdate(hostname, replacement);
- *port = 5060;
- }
- else{
- TSK_DEBUG_ERROR("DNS NAPTR query returned invalid falgs.");
- }
- }
- else{
- TSK_DEBUG_ERROR("DNS NAPTR query returned zero result.");
- }
-
- TSK_FREE(flags);
- TSK_FREE(replacement);
- }
-
- TSK_OBJECT_SAFE_FREE(response);
-
- return (hostname && *hostname && !tsk_strempty(*hostname)) ? 0 : -2;
-}
-
-// remove timedout entries
-int tnet_dns_cache_maintenance(tnet_dns_ctx_t *ctx)
-{
-
- if(ctx)
- {
- tsk_list_item_t *item;
- tsk_safeobj_lock(ctx);
-again:
-
- tsk_list_foreach(item, ctx->cache)
- {
- // FIXME: ttl should be from RR::ttl
- tnet_dns_cache_entry_t *entry = (tnet_dns_cache_entry_t*)item->data;
- if((entry ->epoch + ctx->cache_ttl) < tsk_time_epoch()){
- tsk_list_remove_item_by_data(ctx->cache, entry);
- goto again; /* Do not delete data while looping */
- }
- }
-
- tsk_safeobj_unlock(ctx);
-
- return 0;
- }
- return -1;
-}
-
-// add an entry to the cache
-int tnet_dns_cache_entry_add(tnet_dns_ctx_t *ctx, const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tnet_dns_response_t* response)
-{
- int ret = -1;
-
- if(ctx)
- {
- tnet_dns_cache_entry_t *entry;
-
- tsk_safeobj_lock(ctx);
-
- entry = 0;
-
- /* Retrieve from cache */
- entry = (tnet_dns_cache_entry_t*)tnet_dns_cache_entry_get(ctx, qname, qclass, qtype);
-
- if(entry){
- /* UPDATE */
- TSK_OBJECT_SAFE_FREE(entry->response);
- entry->response = tsk_object_ref(response);
- entry->epoch = tsk_time_epoch();
- ret = 0;
- goto done;
- }
- else{
- /* CREATE */
- entry = tnet_dns_cache_entry_create(qname, qclass, qtype, response);
- if(entry){
- tsk_list_push_back_data(ctx->cache, (void**)&entry);
- ret = 0;
- goto done;
- }
- else{
- ret = -2;
- goto done;
- }
- }
-done:
- tsk_safeobj_unlock(ctx);
- }
- return ret;
-}
-
-// get an entry from the cache
-const tnet_dns_cache_entry_t* tnet_dns_cache_entry_get(tnet_dns_ctx_t *ctx, const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)
-{
- tnet_dns_cache_entry_t *ret = tsk_null;
- if(ctx)
- {
- tsk_list_item_t *item;
-
- tsk_safeobj_lock(ctx);
-
- tsk_list_foreach(item, ctx->cache){
- tnet_dns_cache_entry_t *entry = (tnet_dns_cache_entry_t*)item->data;
- if(entry->qtype == qtype && entry->qclass == qclass && tsk_strequals(entry->qname, qname)){
- ret = entry;
- break;
- }
- }
-
- tsk_safeobj_unlock(ctx);
- }
-
- return ret;
-}
-
-
-/**@ingroup tnet_dns_group
-* Adds new DNS server to the list of the list of servers to query.
-* @param ctx DNS context containing the user parameters. The new DNS server will be added to this context.
-* @param host The IP address (or FQDN) of the dns server to add to the server.
-* @retval zero if succeed and non-zero error code otherwise.
-*/
-int tnet_dns_add_server(tnet_dns_ctx_t *ctx, const char* host)
-{
- tnet_address_t *address;
-
- if(!ctx || !host){
- return -1;
- }
-
- if(!ctx->servers){
- ctx->servers = tsk_list_create();
- }
-
- if((address = tnet_address_create(host))){
- address->family = tnet_get_family(host, TNET_DNS_SERVER_PORT_DEFAULT);
- address->dnsserver = 1;
- tsk_list_push_ascending_data(ctx->servers, (void**)&address);
-
- return 0;
- }
-
- return -2;
-}
-
-//=================================================================================================
-// [[DNS CACHE ENTRY]] object definition
-//
-static tsk_object_t* tnet_dns_cache_entry_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_cache_entry_t *entry = self;
- if(entry){
- entry->qname = tsk_strdup(va_arg(*app, const char*));
- entry->qclass = va_arg(*app, tnet_dns_qtype_t);
- entry->qtype = va_arg(*app, tnet_dns_qtype_t);
- entry->response = tsk_object_ref(va_arg(*app, tnet_dns_response_t*));
-
- entry->epoch = tsk_time_epoch();
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_cache_entry_dtor(tsk_object_t * self)
-{
- tnet_dns_cache_entry_t *entry = self;
- if(entry){
- TSK_OBJECT_SAFE_FREE(entry->response);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_cache_entry_def_s =
-{
- sizeof(tnet_dns_cache_entry_t),
- tnet_dns_cache_entry_ctor,
- tnet_dns_cache_entry_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_cache_entry_def_t = &tnet_dns_cache_entry_def_s;
-
-
-//=================================================================================================
-// [[DNS CONTEXT]] object definition
-//
-static tsk_object_t* tnet_dns_ctx_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_ctx_t *ctx = self;
- if(ctx){
- ctx->timeout = TNET_DNS_TIMEOUT_DEFAULT;
- ctx->recursion = tsk_true;
- ctx->edns0 = tsk_true;
- ctx->caching = tsk_false;
-
- ctx->cache_ttl = TNET_DNS_CACHE_TTL;
-
- ctx->server_port = TNET_DNS_SERVER_PORT_DEFAULT;
-
- /* Gets all dns servers. */
- ctx->servers = tnet_get_addresses_all_dnsservers();
- /* Creates empty cache. */
- ctx->cache = tsk_list_create();
-
-#if HAVE_DNS_H
- ctx->resolv_handle = dns_open(NULL);
-#endif
-
- tsk_safeobj_init(ctx);
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_ctx_dtor(tsk_object_t * self)
-{
- tnet_dns_ctx_t *ctx = self;
- if(ctx){
- tsk_safeobj_deinit(ctx);
-
- TSK_OBJECT_SAFE_FREE(ctx->servers);
- TSK_OBJECT_SAFE_FREE(ctx->cache);
-
-#if HAVE_DNS_H
- dns_free(ctx->resolv_handle);
-#endif
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_ctx_def_s =
-{
- sizeof(tnet_dns_ctx_t),
- tnet_dns_ctx_ctor,
- tnet_dns_ctx_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_ctx_def_t = &tnet_dns_ctx_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns.h b/branches/1.0/tinyNET/src/dns/tnet_dns.h
deleted file mode 100644
index 0ff6290..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns.h
- * @brief DNS utilities functions (RFCS [1034 1035] [2671] [3401 3402 3403 3404] [3761]).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DNS_H
-#define TNET_DNS_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_message.h"
-
-#include "tnet_utils.h"
-
-#include "tsk_safeobj.h"
-
-#if HAVE_DNS_H
-#include <dns.h>
-#endif
-
-TNET_BEGIN_DECLS
-
-/**@ingroup tnet_dns_group
-*/
-#define TNET_DNS_CACHE_TTL (15000 * 1000)
-
-/**@ingroup tnet_dns_group
-* Default timeout (in milliseconds) value for DNS queries.
-*/
-#define TNET_DNS_TIMEOUT_DEFAULT 5000 //(5 seconds)
-
-/**@ingroup tnet_dns_group
-* Maximum supported Dgram size to advertise using EDNS0.
-*/
-#define TNET_DNS_DGRAM_SIZE_DEFAULT 4096
-
-/**@ingroup tnet_dns_group
-*/
-#define TNET_DNS_SERVER_PORT_DEFAULT 53
-
-/**DNS cache entry.
-*/
-typedef struct tnet_dns_cache_entry_s
-{
- TSK_DECLARE_OBJECT;
-
- char* qname;
- tnet_dns_qclass_t qclass;
- tnet_dns_qtype_t qtype;
-
- uint64_t epoch;
-
- tnet_dns_response_t *response;
-}
-tnet_dns_cache_entry_t;
-typedef tsk_list_t tnet_dns_cache_entries_L_t;
-typedef tnet_dns_cache_entries_L_t tnet_dns_cache_t;
-
-/**DNS context.
-*/
-typedef struct tnet_dns_ctx_s
-{
- TSK_DECLARE_OBJECT;
-
- uint64_t timeout; /**< In milliseconds. Default: @ref TNET_DNS_TIMEOUT_DEFAULT. */
- tsk_bool_t recursion; /**< Indicates whether to direct the name server to pursue the query recursively. Default: enabled.*/
- tsk_bool_t edns0; /**< Indicates whether to enable EDNS0 (Extension Mechanisms for DNS) or not. This option will allow you to send DNS packet larger than 512 bytes. Default: enabled. */
- tsk_bool_t caching; /**< Indicates whether to enable the DNS cache or not. Default: no. */
-
- int32_t cache_ttl;
-
- tnet_port_t server_port; /**< Default port (@a TNET_DNS_SERVER_PORT_DEFAULT)) */
-
- tnet_dns_cache_t *cache;
- tnet_addresses_L_t *servers;
-
-#if HAVE_DNS_H
- dns_handle_t resolv_handle;
-#endif
-
- TSK_DECLARE_SAFEOBJ;
-}
-tnet_dns_ctx_t;
-
-TINYNET_API int tnet_dns_cache_clear(tnet_dns_ctx_t* ctx);
-TINYNET_API tnet_dns_response_t* tnet_dns_resolve(tnet_dns_ctx_t* ctx, const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype);
-TINYNET_API tnet_dns_response_t* tnet_dns_enum(tnet_dns_ctx_t* ctx, const char* e164num, const char* domain);
-TINYNET_API char* tnet_dns_enum_2(tnet_dns_ctx_t* ctx, const char* service, const char* e164num, const char* domain);
-TINYNET_API int tnet_dns_query_srv(tnet_dns_ctx_t *ctx, const char* service, char** hostname, tnet_port_t* port);
-TINYNET_API int tnet_dns_query_naptr_srv(tnet_dns_ctx_t *ctx, const char* domain, const char* service, char** hostname, tnet_port_t* port);
-
-TINYNET_API int tnet_dns_add_server(tnet_dns_ctx_t *ctx, const char* host);
-
-TINYNET_API tnet_dns_ctx_t* tnet_dns_ctx_create();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_ctx_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_cache_entry_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_H */
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_a.c b/branches/1.0/tinyNET/src/dns/tnet_dns_a.c
deleted file mode 100644
index f53e070..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_a.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_a.c
- * @brief DNS Address record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_a.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_debug.h"
-
-/** Creates new DNS A Resource Record.
-*/
-tnet_dns_a_t* tnet_dns_a_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_a_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-
-//=================================================================================================
-// [[DNS A]] object definition
-//
-static tsk_object_t* tnet_dns_a_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_a_t *a = self;
- if(a){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- const uint8_t* rddata = (((uint8_t*)data) + offset);
- //const uint8_t* dataEnd = (rddata + rdlength);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(a), qtype_a, qclass);
- TNET_DNS_RR(a)->name = tsk_strdup(name);
- TNET_DNS_RR(a)->rdlength = rdlength;
- TNET_DNS_RR(a)->ttl = ttl;
-
- if(rddata && rdlength && (rdlength == 4/* 32bits */)){
- // ==> DESERIALIZATION
- /* ADDRESS */
- uint32_t address = tnet_htonl_2(rddata);
- tsk_sprintf(&(a->address), "%u.%u.%u.%u", (address>>24)&0xFF, (address>>16)&0xFF, (address>>8)&0xFF, (address>>0)&0xFF);
- }
- else{
- TSK_DEBUG_ERROR("Invalid IPv4 address.");
- }
-
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_a_dtor(tsk_object_t * self)
-{
- tnet_dns_a_t *a = self;
- if(a){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(a));
-
- TSK_FREE(a->address);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_a_def_s =
-{
- sizeof(tnet_dns_a_t),
- tnet_dns_a_ctor,
- tnet_dns_a_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_a_def_t = &tnet_dns_a_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_a.h b/branches/1.0/tinyNET/src/dns/tnet_dns_a.h
deleted file mode 100644
index 19fb910..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_a.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_a.h
- * @brief DNS Address record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_A_H
-#define TNET_DNS_RR_A_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-TNET_BEGIN_DECLS
-
-
-/**DNS A Resource Record.
-*/
-typedef struct tnet_dns_a_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 1035 - 3.4.1. A RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | ADDRESS |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- char* address;
-}
-tnet_dns_a_t;
-
-TINYNET_API tnet_dns_a_t* tnet_dns_a_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_a_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_A_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.c b/branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.c
deleted file mode 100644
index ab1fa64..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_aaaA.c
- * @brief DNS IPv6 address record - RR - (RFC 3596).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_aaaa.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_debug.h"
-
-/** Creates new DNS AAAA Resource Record.
-*/
-
-tnet_dns_aaaa_t* tnet_dns_aaaa_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_aaaa_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-
-//=================================================================================================
-// [[DNS AAAA]] object definition
-//
-static tsk_object_t* tnet_dns_aaaa_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_aaaa_t *aaaa = self;
- if(aaaa){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- const uint8_t* rddata = (((uint8_t*)data) + offset);
- //const uint8_t* dataEnd = (rddata + rdlength);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(aaaa), qtype_aaaa, qclass);
- TNET_DNS_RR(aaaa)->name = tsk_strdup(name);
- TNET_DNS_RR(aaaa)->rdlength = rdlength;
- TNET_DNS_RR(aaaa)->ttl = ttl;
-
- if(rddata && rdlength && (rdlength == 16/* 128bits */)){
- // ==> DESERIALIZATION
- /* ADDRESS */
- tsk_sprintf(&(aaaa->address), "%x:%x:%x:%x:%x:%x:%x:%x",
- tnet_ntohs_2(&rddata[0]), tnet_ntohs_2(&rddata[2]), tnet_ntohs_2(&rddata[4]), tnet_ntohs_2(&rddata[6]),
- tnet_ntohs_2(&rddata[8]), tnet_ntohs_2(&rddata[10]), tnet_ntohs_2(&rddata[12]), tnet_ntohs_2(&rddata[14]));
- }
- else{
- TSK_DEBUG_ERROR("Invalid IPv6 address.");
- }
-
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_aaaa_dtor(tsk_object_t * self)
-{
- tnet_dns_aaaa_t *aaaa = self;
- if(aaaa){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(aaaa));
-
- TSK_FREE(aaaa->address);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_aaaa_def_s =
-{
- sizeof(tnet_dns_aaaa_t),
- tnet_dns_aaaa_ctor,
- tnet_dns_aaaa_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_aaaa_def_t = &tnet_dns_aaaa_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.h b/branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.h
deleted file mode 100644
index 73d5f3f..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_aaaa.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_aaaa.h
- * @brief DNS IPv6 address record - RR - (RFC 3596).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_AAAA_H
-#define TNET_DNS_RR_AAAA_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-/**DNS AAAA Resource Record.
-*/
-typedef struct tnet_dns_aaaa_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 3596 -
- */
- char* address;
-}
-tnet_dns_aaaa_t;
-
-tnet_dns_aaaa_t* tnet_dns_aaaa_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_aaaa_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_AAAA_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_cname.c b/branches/1.0/tinyNET/src/dns/tnet_dns_cname.c
deleted file mode 100644
index 507a713..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_cname.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_cname.c
- * @brief DNS Mail eXchange record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_cname.h"
-
-#include "../tnet_types.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-/** Creates new DNS CNAME Resource Record.
-*/
-
-tnet_dns_cname_t* tnet_dns_cname_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_cname_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-
-//=================================================================================================
-// [[DNS CNAME]] object definition
-//
-static tsk_object_t* tnet_dns_cname_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_cname_t *cname = self;
- if(cname){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(cname), qtype_cname, qclass);
- TNET_DNS_RR(cname)->name = tsk_strdup(name);
- TNET_DNS_RR(cname)->rdlength = rdlength;
- TNET_DNS_RR(cname)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* CNAME */
- tnet_dns_rr_qname_deserialize(data, &(cname->cname), &offset);
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_cname_dtor(tsk_object_t * self)
-{
- tnet_dns_cname_t *cname = self;
- if(cname){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(cname));
-
- TSK_FREE(cname->cname);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_cname_def_s =
-{
- sizeof(tnet_dns_cname_t),
- tnet_dns_cname_ctor,
- tnet_dns_cname_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_cname_def_t = &tnet_dns_cname_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_cname.h b/branches/1.0/tinyNET/src/dns/tnet_dns_cname.h
deleted file mode 100644
index b41b159..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_cname.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_cname.h
- * @brief DNS Mail eXchange record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_CNAME_H
-#define TNET_DNS_RR_CNAME_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-
-/** DNS CNAME Resource Record
-*/
-typedef struct tnet_dns_cname_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* 3.3.1. CNAME RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / CNAME /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- char* cname;
-}
-tnet_dns_cname_t;
-
-tnet_dns_cname_t* tnet_dns_cname_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_cname_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_CNAME_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_message.c b/branches/1.0/tinyNET/src/dns/tnet_dns_message.c
deleted file mode 100644
index cc2c2e2..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_message.c
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_message.h
- * @brief DNS Message holding RRs (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_message.h"
-
-#include "../tnet_utils.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_memory.h"
-#include "tsk_string.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-/**@ingroup tnet_dns_group
-* Creates new DNS message.
-* @sa tnet_dns_message_create_null.
-*/
-tnet_dns_message_t* tnet_dns_message_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tsk_bool_t isquery)
-{
- return tsk_object_new(tnet_dns_message_def_t, qname, qclass, qtype, isquery);
-}
-
-/**@ingroup tnet_dns_group
-* Creates new DNS message.
-* @sa tnet_dns_message_create.
-*/
-tnet_dns_message_t* tnet_dns_message_create_null()
-{
- return tnet_dns_message_create(tsk_null, qclass_any, qtype_any, tsk_false);
-}
-
-/**@ingroup tnet_dns_group
-* Creates new DNS response message.
-* @sa tnet_dns_query_create.
-*/
-tnet_dns_response_t* tnet_dns_response_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)
-{
- return tnet_dns_message_create(qname, qclass, qtype, tsk_false);
-}
-
-/**@ingroup tnet_dns_group
-* Creates new DNS query message.
-* @sa tnet_dns_response_create.
-*/
-tnet_dns_query_t* tnet_dns_query_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)
-{
- return tnet_dns_message_create(qname, qclass, qtype, tsk_true);
-}
-
-/**@ingroup tnet_dns_group
-* Serializes a DNS message in binary data.
-* @param message The DNS message to seriablize.
-* @retval The binary buffer containong the message if succeed. Otherwise, @a tsk_null is returned.
-* @sa tnet_dns_message_deserialize.
-*/
-tsk_buffer_t* tnet_dns_message_serialize(const tnet_dns_message_t *message)
-{
- tsk_buffer_t* output = tsk_null;
- uint16_t _2bytes;
- tsk_list_item_t *item;
-
- /* Check message validity */
- if(!message){
- goto bail;
- }
-
- /* Creates empty buffer */
- output = tsk_buffer_create_null();
-
- /* ==============================
- * HEADER
- */
- //tsk_buffer_append(output, &(message->Header), sizeof(message->Header));
-
- /* ID */
- _2bytes = tnet_ntohs(message->Header.ID);
- tsk_buffer_append(output, &(_2bytes), 2);
- /* |QR| Opcode |AA|TC|RD|RA| Z | RCODE | */
- {
- uint16_t temp, _2bytes = 0;
-
- temp = message->Header.QR, temp <<= 15;
- _2bytes |= temp;
-
- temp = message->Header.OPCODE, temp <<= 11;
- _2bytes |= temp;
-
- temp = message->Header.AA, temp <<= 10;
- _2bytes |= temp;
-
- temp = message->Header.TC, temp <<= 9;
- _2bytes |= temp;
-
- temp = message->Header.RD, temp <<= 8;
- _2bytes |= temp;
-
- temp = message->Header.RA, temp <<= 7;
- _2bytes |= temp;
-
- temp = message->Header.Z, temp <<= 4;
- _2bytes |= temp;
-
- temp = message->Header.RCODE, temp <<= 4;
- _2bytes |= temp;
-
- _2bytes = tnet_ntohs(_2bytes);
- tsk_buffer_append(output, &(_2bytes), 2);
- }
- /* QDCOUNT */
- _2bytes = tnet_ntohs(message->Header.QDCOUNT);
- tsk_buffer_append(output, &(_2bytes), 2);
- /* ANCOUNT */
- _2bytes = tnet_ntohs(message->Header.ANCOUNT);
- tsk_buffer_append(output, &(_2bytes), 2);
- /* NSCOUNT */
- _2bytes = tnet_ntohs(message->Header.NSCOUNT);
- tsk_buffer_append(output, &(_2bytes), 2);
- /* ARCOUNT */
- _2bytes = tnet_ntohs(message->Header.ARCOUNT);
- tsk_buffer_append(output, &(_2bytes), 2);
-
-
- /* ==============================
- * QUESTION
- */
- if(TNET_DNS_MESSAGE_IS_QUERY(message))
- {
- /* QNAME */
- tnet_dns_rr_qname_serialize(message->Question.QNAME, output);
- /* QTYPE */
- _2bytes = tnet_ntohs(message->Question.QTYPE);
- tsk_buffer_append(output, &(_2bytes), 2);
- /* QCLASS */
- _2bytes = tnet_ntohs(message->Question.QCLASS);
- tsk_buffer_append(output, &(_2bytes), 2);
- }
-
- /* ==============================
- * ANSWERS
- */
- tsk_list_foreach(item, message->Answers)
- {
- tnet_dns_rr_serialize((tnet_dns_rr_t *)item->data, output);
- }
-
- /* ==============================
- * AUTHORITIES
- */
- tsk_list_foreach(item, message->Authorities)
- {
- tnet_dns_rr_serialize((tnet_dns_rr_t *)item->data, output);
- }
-
- /* ==============================
- * ADDITIONALS
- */
- tsk_list_foreach(item, message->Additionals)
- {
- tnet_dns_rr_serialize((tnet_dns_rr_t *)item->data, output);
- }
-
-
-bail:
- return output;
-}
-
-/**@ingroup tnet_dns_group
-* Deserialize a STUN message from binary data.
-* @param data A pointer to the binary data.
-* @param size The size of the bnary data buffer.
-* @retval @ref tnet_dns_message_t object if succeed or NULL otherwise.
-* @sa @ref tnet_dns_message_serialize.
-*/
-tnet_dns_message_t* tnet_dns_message_deserialize(const uint8_t *data, tsk_size_t size)
-{
- tnet_dns_message_t *message = 0;
- uint8_t *dataPtr, *dataEnd, *dataStart;
- uint16_t i;
- tsk_size_t offset = 0;
-
- if(!data || !size){
- goto bail;
- }
-
- dataPtr = (uint8_t*)data;
- dataStart = dataPtr;
- dataEnd = (dataStart + size);
-
- message = tnet_dns_message_create_null();
-
- /* === HEADER ===*/
- /* ID */
- message->Header.ID = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
- /* |QR| Opcode |AA|TC|RD|RA| Z | RCODE | */
- {
- uint16_t flags = tnet_ntohs_2(dataPtr);
-
- message->Header.QR = (flags >> 15);
- message->Header.OPCODE = ((flags >> 11) & 0x000F);
- message->Header.AA = ((flags >> 10) & 0x0001);
- message->Header.TC = ((flags >> 9) & 0x0001);
- message->Header.RD = ((flags >> 8) & 0x0001);
- message->Header.RA = ((flags >> 7) & 0x0001);
- message->Header.Z = ((flags >> 4) & 0x0007);
- message->Header.RCODE = (flags & 0x000F);
-
- dataPtr += 2;
- }
- /* QDCOUNT */
- message->Header.QDCOUNT = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
- /* ANCOUNT */
- message->Header.ANCOUNT = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
- /* NSCOUNT */
- message->Header.NSCOUNT = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
- /* ARCOUNT */
- message->Header.ARCOUNT = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
-
- /* === Queries ===*/
- offset = (dataPtr - dataStart);
- for(i=0; i<message->Header.QDCOUNT; i++)
- {
- /* Do not need to parse queries in the response ==> silently ignore */
- char* name = 0;
- tnet_dns_rr_qname_deserialize(dataStart, &name, &offset); /* QNAME */
- dataPtr+=offset;
- dataPtr+=4, offset+=4; /* QTYPE + QCLASS */
- TSK_FREE(name);
- }
- dataPtr = (dataStart + offset); /* TODO: remove ==> obly for debug tests */
-
- /* === Answers ===*/
- offset = (dataPtr - dataStart);
- for(i=0; i<message->Header.ANCOUNT; i++)
- {
- tnet_dns_rr_t* rr = tnet_dns_rr_deserialize(dataStart, (dataEnd-dataPtr), &offset);
- if(rr){
- if(!message->Answers){
- message->Answers = tsk_list_create();
- }
- /* Push in descending order (useful for NAPTR and SRV records). */
- tsk_list_push_descending_data(message->Answers, (void**)&rr);
- }
- }
- dataPtr = (dataStart + offset);
-
- /* === Authorities ===*/
- offset = (dataPtr - dataStart);
- for(i=0; i<message->Header.NSCOUNT; i++)
- {
- tnet_dns_rr_t* rr = tnet_dns_rr_deserialize(dataStart, (dataEnd-dataPtr), &offset);
- if(rr){
- if(!message->Authorities){
- message->Authorities = tsk_list_create();
- }
- tsk_list_push_back_data(message->Authorities, (void**)&rr);
- }
- }
- dataPtr = (dataStart + offset);
-
- /* === Additionals ===*/
- offset = (dataPtr - dataStart);
- for(i=0; i<message->Header.ARCOUNT; i++)
- {
- tnet_dns_rr_t* rr = tnet_dns_rr_deserialize(dataStart, (dataEnd-dataPtr), &offset);
- if(rr){
- if(!message->Additionals){
- message->Additionals = tsk_list_create();
- }
- tsk_list_push_back_data(message->Additionals, (void**)&rr);
- }
- }
- dataPtr = (dataStart + offset);
-
-
-bail:
- return message;
-}
-
-//=================================================================================================
-// [[DNS MESSAGE]] object definition
-//
-static tsk_object_t* tnet_dns_message_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_message_t *message = self;
- if(message){
- static uint16_t __dnsmessage_unique_id = 0;
-
- const char* qname = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- tnet_dns_qtype_t qtype = va_arg(*app, tnet_dns_qtype_t);
- tsk_bool_t isquery = va_arg(*app, tsk_bool_t);
-
- /* Create random ID. */
- message->Header.ID = ++__dnsmessage_unique_id;
-
- /* QR field ==> query (0) - response (1) */
- message->Header.QR = isquery ? 0 : 1;
-
- if(isquery){
- /* QDCOUNT field ==> at least one question */
- message->Header.QDCOUNT = 1;
- }
-
- if(qname){
- message->Question.QNAME = tsk_strdup(qname);
- message->Question.QTYPE = qtype;
- message->Question.QCLASS = qclass;
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_message_dtor(tsk_object_t * self)
-{
- tnet_dns_message_t *message = self;
- if(message){
- TSK_FREE(message->Question.QNAME);
-
- TSK_OBJECT_SAFE_FREE(message->Answers);
- TSK_OBJECT_SAFE_FREE(message->Authorities);
- TSK_OBJECT_SAFE_FREE(message->Additionals);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_message_def_s =
-{
- sizeof(tnet_dns_message_t),
- tnet_dns_message_ctor,
- tnet_dns_message_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_message_def_t = &tnet_dns_message_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_message.h b/branches/1.0/tinyNET/src/dns/tnet_dns_message.h
deleted file mode 100644
index a474095..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_message.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_message.h
- * @brief DNS Message holding RRs (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DNS_MESSAGE_H
-#define TNET_DNS_MESSAGE_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-#include "tsk_buffer.h"
-
-/**@ingroup tnet_dns_group
-* @def TNET_DNS_MESSAGE_IS_RESPONSE
-* Checks whether the STUN message is a response or not(query).
-* @sa TNET_DNS_MESSAGE_IS_QUERY.
-*/
-/**@ingroup tnet_dns_group
-* @def TNET_DNS_MESSAGE_IS_QUERY
-* Checks whether the STUN message is a query or not(response).
-* @sa TNET_DNS_MESSAGE_IS_RESPONSE.
-*/
-
-TNET_BEGIN_DECLS
-
-
-#define TNET_DNS_MESSAGE_IS_RESPONSE(message) ((message) && (message)->Header.QR == 1)
-#define TNET_DNS_MESSAGE_IS_QUERY(message) ((message) && (message)->Header.QR == 0)
-
-/**@ingroup tnet_dns_group
-* @def TNET_DNS_RESPONSE_IS_SUCCESS
-* Checks whether the STUN message is a success response or not(error).
-* @sa TNET_DNS_RESPONSE_IS_ERROR.
-*/
-/**@ingroup tnet_dns_group
-* @def TNET_DNS_RESPONSE_IS_ERROR
-* Checks whether the STUN message is an error response or not(success).
-* @sa TNET_DNS_RESPONSE_IS_SUCCESS.
-*/
-#define TNET_DNS_RESPONSE_IS_SUCCESS(response) ((response) && (response)->Header.RCODE == rcode_noerror)
-#define TNET_DNS_RESPONSE_IS_ERROR(response) !TNET_DNS_RESPONSE_IS_SUCCESS(response)
-
-/**Response codes as per RFC 1035 subclause 4.1.1.
-*/
-typedef enum tnet_dns_rcode_e
-{
- rcode_noerror = 0,
- rcode_error_format = 1,
- rcode_server_failure = 2,
- rcode_error_name = 3,
- rcode_notimplemented = 4,
- rcode_refused = 5
-}
-tnet_dns_rcode_t;
-
-/**OPCODE defining the kind of query as per RFC 1035 subclause 4.1.1.
-*/
-typedef enum tnet_dns_opcode_e
-{
- opcode_query = 0, /**< 0 a standard query (QUERY) */
- opcode_iquery = 1, /**< 1 an inverse query (IQUERY) */
- opcode_status = 2, /**< 2 a server status request (STATUS) */
-}
-tnet_dns_opcode_t;
-
-/** DNS message as per RFC 1035 subclause 4.
-*/
-typedef struct tnet_dns_message_s
-{
- TSK_DECLARE_OBJECT;
-
- /* RFC 1035 - 4.1. Format
- +---------------------+
- | Header |
- +---------------------+
- | Question | the question for the name server
- +---------------------+
- | Answer | RRs answering the question
- +---------------------+
- | Authority | RRs pointing toward an authority
- +---------------------+
- | Additional | RRs holding additional information
- +---------------------+
- */
-
- /* RFC 1035 - 4.1.1. Header section format
- 1 1 1 1 1 1
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | ID |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- |QR| Opcode |AA|TC|RD|RA| Z | RCODE |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | QDCOUNT |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | ANCOUNT |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | NSCOUNT |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | ARCOUNT |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- struct
- {
- uint16_t ID;
- unsigned QR:1;
- unsigned OPCODE:4; /* see @ref tnet_dns_opcode_t */
- unsigned AA:1;
- unsigned TC:1;
- unsigned RD:1;
- unsigned RA:1;
- unsigned Z:3;
- unsigned RCODE:4; /* see @ref tnet_dns_rcode_t */
- uint16_t QDCOUNT;
- uint16_t ANCOUNT;
- uint16_t NSCOUNT;
- uint16_t ARCOUNT;
- }
- Header;
-
- /* RFc 1035 - 4.1.2. Question section format
- 1 1 1 1 1 1
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | |
- / QNAME /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | QTYPE |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | QCLASS |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- struct
- {
- /** RFC 1035 - 4.1.2. Question section format
- a domain name represented as a sequence of labels, where
- each label consists of a length octet followed by that
- number of octets. The domain name terminates with the
- zero length octet for the null label of the root. Note
- that this field may be an odd number of octets; no
- padding is used.*/
- void* QNAME;
- /** RFC 1035 - 4.1.2. Question section format
- a two octet code which specifies the type of the query.
- The values for this field include all codes valid for a
- TYPE field, together with some more general codes which
- can match more than one type of RR.*/
- tnet_dns_qtype_t QTYPE;
- /* RFC 1035 - 4.1.2. Question section format
- a two octet code that specifies the class of the query.
- For example, the QCLASS field is IN for the Internet.
- */
- tnet_dns_qclass_t QCLASS;
- }
- Question;
-
- tnet_dns_rrs_L_t *Answers; /**< Filtered answers by priority. */
- tnet_dns_rrs_L_t *Authorities;
- tnet_dns_rrs_L_t *Additionals;
-}
-tnet_dns_message_t;
-
-typedef tsk_list_t tnet_dns_messages_L_t; /**< List of @ref tnet_dns_message_t elements. */
-typedef tnet_dns_message_t tnet_dns_query_t; /**< DNS Query messsage. */
-typedef tnet_dns_message_t tnet_dns_response_t; /**< DNS response message. */
-
-tsk_buffer_t* tnet_dns_message_serialize(const tnet_dns_message_t *message);
-tnet_dns_message_t* tnet_dns_message_deserialize(const uint8_t *data, tsk_size_t size);
-
-
-tnet_dns_message_t* tnet_dns_message_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tsk_bool_t isquery);
-tnet_dns_message_t* tnet_dns_message_create_null();
-tnet_dns_response_t* tnet_dns_response_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype);
-tnet_dns_query_t* tnet_dns_query_create(const char* qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_message_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_MESSAGE_H */
-
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_mx.c b/branches/1.0/tinyNET/src/dns/tnet_dns_mx.c
deleted file mode 100644
index 8537af7..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_mx.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_mx.c
- * @brief DNS Mail eXchange record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_mx.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-/** Creates new DNS MX Resource Record.
-*/
-tnet_dns_mx_t* tnet_dns_mx_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_mx_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-//=================================================================================================
-// [[DNS MX]] object definition
-//
-static tsk_object_t* tnet_dns_mx_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_mx_t *mx = self;
- if(mx){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(mx), qtype_mx, qclass);
- TNET_DNS_RR(mx)->name = tsk_strdup(name);
- TNET_DNS_RR(mx)->rdlength = rdlength;
- TNET_DNS_RR(mx)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* PREFERENCE */
- mx->preference = tnet_ntohs_2(((uint8_t*)data) + offset);
- offset += 2;
- /* EXCHANGE */
- tnet_dns_rr_qname_deserialize(data, &(mx->exchange), &offset);
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_mx_dtor(tsk_object_t * self)
-{
- tnet_dns_mx_t *mx = self;
- if(mx){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(mx));
-
- TSK_FREE(mx->exchange);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_mx_def_s =
-{
- sizeof(tnet_dns_mx_t),
- tnet_dns_mx_ctor,
- tnet_dns_mx_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_mx_def_t = &tnet_dns_mx_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_mx.h b/branches/1.0/tinyNET/src/dns/tnet_dns_mx.h
deleted file mode 100644
index 1bc4f66..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_mx.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_mx.h
- * @brief DNS Mail eXchange record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_MX_H
-#define TNET_DNS_RR_MX_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-
-/** DNS MX Resource Record
-*/
-typedef struct tnet_dns_mx_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 1035 - 3.3.9. MX RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | PREFERENCE |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / EXCHANGE /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- uint16_t preference;
- char* exchange;
-}
-tnet_dns_mx_t;
-
-tnet_dns_mx_t* tnet_dns_mx_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_mx_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_MX_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_naptr.c b/branches/1.0/tinyNET/src/dns/tnet_dns_naptr.c
deleted file mode 100644
index 4152734..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_naptr.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_naptr.c
- * @brief DNS Naming Authority Pointer - RR - (RFC 3403).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_naptr.h"
-
-
-#include "../tnet_types.h"
-#include "./tnet_endianness.h"
-
-#include "tsk_memory.h"
-#include "tsk_string.h"
-
-/** Creates new DNS NAPTR Resource Record.
-*/
-tnet_dns_naptr_t* tnet_dns_naptr_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_naptr_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-
-
-//=================================================================================================
-// [[DNS NAPTR]] object definition
-//
-static tsk_object_t* tnet_dns_naptr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_naptr_t *naptr = self;
- if(naptr){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(naptr), qtype_naptr, qclass);
- TNET_DNS_RR(naptr)->name = tsk_strdup(name);
- TNET_DNS_RR(naptr)->rdlength = rdlength;
- TNET_DNS_RR(naptr)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* ORDER */
- naptr->order = tnet_ntohs_2(((uint8_t*)data) + offset);
- offset += 2;
- /* PREFERENCE */
- naptr->preference = tnet_ntohs_2(((uint8_t*)data) + offset);
- offset += 2;
- /* FLAGS */
- tnet_dns_rr_charstring_deserialize(data, &(naptr->flags), &offset);
- /* SERVICES */
- tnet_dns_rr_charstring_deserialize(data, &(naptr->services), &offset);
- /* REGEXP */
- tnet_dns_rr_charstring_deserialize(data, &(naptr->regexp), &offset);
- /* REPLACEMENT */
- tnet_dns_rr_qname_deserialize(data, &(naptr->replacement), &offset);
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_naptr_dtor(tsk_object_t * self)
-{
- tnet_dns_naptr_t *naptr = self;
- if(naptr){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(naptr));
-
- TSK_FREE(naptr->flags);
- TSK_FREE(naptr->services);
- TSK_FREE(naptr->regexp);
- TSK_FREE(naptr->replacement);
- }
- return self;
-}
-
-static int tnet_dns_naptr_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2)
-{
- const tnet_dns_rr_t* rr1 = obj1;
- const tnet_dns_rr_t* rr2 = obj2;
-
- if(rr1 && rr2 && (rr1->qtype==qtype_naptr) && (rr2->qtype==qtype_naptr)){
- const tnet_dns_naptr_t* naptr1 = (tnet_dns_naptr_t*)rr1;
- const tnet_dns_naptr_t* naptr2 = (tnet_dns_naptr_t*)rr2;
-
- /* Compare orders. */
- if(naptr1->order < naptr2->order){ /* Lowest order is tried first. */
- return 1;
- }
- else if(naptr1->order > naptr2->order){
- return -1;
- }
-
- /* Compare preference */
- if(naptr1->order < naptr2->order){ /* Lowest preference is tried first. */
- return 1;
- }
- else if(naptr1->order > naptr2->order){
- return -1;
- }
-
- return 0;
- }
- else{
- return -1;
- }
-}
-
-static const tsk_object_def_t tnet_dns_naptr_def_s =
-{
- sizeof(tnet_dns_naptr_t),
- tnet_dns_naptr_ctor,
- tnet_dns_naptr_dtor,
- tnet_dns_naptr_cmp,
-};
-const tsk_object_def_t *tnet_dns_naptr_def_t = &tnet_dns_naptr_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_naptr.h b/branches/1.0/tinyNET/src/dns/tnet_dns_naptr.h
deleted file mode 100644
index b601d49..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_naptr.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_naptr.h
- * @brief DNS Naming Authority Pointer - RR - (RFC 3403).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_NAPTR_H
-#define TNET_DNS_RR_NAPTR_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-TNET_BEGIN_DECLS
-
-/** DNS NAPTR Resource Record
-*/
-typedef struct tnet_dns_naptr_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 3403 - 4.1 Packet Format
-
- The packet format for the NAPTR record is as follows
- 1 1 1 1 1 1
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | ORDER |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | PREFERENCE |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / FLAGS /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / SERVICES /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / REGEXP /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / REPLACEMENT /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- <character-string> and <domain-name> as used here are defined in RFC 1035.
- */
- uint16_t order;
- uint16_t preference;
- char* flags;
- char* services;
- char* regexp;
- char* replacement;
-}
-tnet_dns_naptr_t;
-
-TINYNET_API tnet_dns_naptr_t* tnet_dns_naptr_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_naptr_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_NAPTR_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_ns.c b/branches/1.0/tinyNET/src/dns/tnet_dns_ns.c
deleted file mode 100644
index 9453cec..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_ns.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_ns.c
- * @brief DNS Name Server record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_ns.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-#include "tnet_dns_rr.h"
-
-/** Creates new DNS NS Resource Record.
-*/
-tnet_dns_ns_t* tnet_dns_ns_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_ns_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-//=================================================================================================
-// [[DNS NS]] object definition
-//
-static tsk_object_t* tnet_dns_ns_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_ns_t *ns = self;
- if(ns){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(ns), qtype_ns, qclass);
- TNET_DNS_RR(ns)->name = tsk_strdup(name);
- TNET_DNS_RR(ns)->rdlength = rdlength;
- TNET_DNS_RR(ns)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* NSDNAME */
- tnet_dns_rr_qname_deserialize(data, &(ns->nsdname), &offset);
- }
-
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_ns_dtor(tsk_object_t * self)
-{
- tnet_dns_ns_t *ns = self;
- if(ns){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(ns));
-
- TSK_FREE(ns->nsdname);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_ns_def_s =
-{
- sizeof(tnet_dns_ns_t),
- tnet_dns_ns_ctor,
- tnet_dns_ns_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_ns_def_t = &tnet_dns_ns_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_ns.h b/branches/1.0/tinyNET/src/dns/tnet_dns_ns.h
deleted file mode 100644
index 66c4ff8..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_ns.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_ns.h
- * @brief DNS Name Server record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_NS_H
-#define TNET_DNS_RR_NS_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-
-/** DNS NS Resource Record.
-*/
-typedef struct tnet_dns_ns_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 1035 - 3.3.11. NS RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / NSDNAME /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- char* nsdname;
-}
-tnet_dns_ns_t;
-
-TINYNET_API tnet_dns_ns_t* tnet_dns_ns_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_ns_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_NS_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_opt.c b/branches/1.0/tinyNET/src/dns/tnet_dns_opt.c
deleted file mode 100644
index f5e2c57..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_opt.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_opt.c
- * @brief DNS OPT pseudo-RR (RFC 2671).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_opt.h"
-
-
-
-/** Creates new DNS OPT Resource Record.
-*/
-tnet_dns_opt_t* tnet_dns_opt_create(tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_dns_opt_def_t, payload_size);
-}
-
-
-
-
-
-
-
-
-
-//=================================================================================================
-// [[DNS OPT]] object definition
-//
-static tsk_object_t* tnet_dns_opt_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_opt_t *rr_opt = self;
- if(rr_opt){
- uint16_t payload_size = (uint16_t)va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(rr_opt), qtype_opt, qclass_any);
-
- /*
- NAME domain name empty (root domain)
- TYPE u_int16_t OPT
- CLASS u_int16_t sender's UDP payload size
- TTL u_int32_t extended RCODE and flags
- RDLEN u_int16_t describes RDATA
- RDATA octet stream {attribute,value} pairs
-
- */
- TNET_DNS_RR(rr_opt)->qclass = payload_size;
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_opt_dtor(tsk_object_t * self)
-{
- tnet_dns_opt_t *rr_opt = self;
- if(rr_opt){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(rr_opt));
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_opt_def_s =
-{
- sizeof(tnet_dns_opt_t),
- tnet_dns_opt_ctor,
- tnet_dns_opt_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_opt_def_t = &tnet_dns_opt_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_opt.h b/branches/1.0/tinyNET/src/dns/tnet_dns_opt.h
deleted file mode 100644
index 8c0407b..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_opt.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_opt.h
- * @brief DNS OPT pseudo-RR (RFC 2671).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_OPT_H
-#define TNET_DNS_RR_OPT_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-/** DNS OPT Resource Record
-*/
-typedef struct tnet_dns_opt_s
-{
- TNET_DECLARE_DNS_RR;
-}
-tnet_dns_opt_t;
-
-tnet_dns_opt_t* tnet_dns_opt_create(tsk_size_t payload_size);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_opt_def_t;
-
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_OPT_H */
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_ptr.c b/branches/1.0/tinyNET/src/dns/tnet_dns_ptr.c
deleted file mode 100644
index a629b91..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_ptr.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_ptr.c
- * @brief DNS Pointer record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_ptr.h"
-
-#include "../tnet_types.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-/** Creates new DNS PTR Resource Record.
-*/
-
-
-tnet_dns_ptr_t* tnet_dns_ptr_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void*data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_ptr_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-//=================================================================================================
-// [[DNS PTR]] object definition
-//
-static tsk_object_t* tnet_dns_ptr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_ptr_t *ptr = self;
- if(ptr){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(ptr), qtype_ptr, qclass);
- TNET_DNS_RR(ptr)->name = tsk_strdup(name);
- TNET_DNS_RR(ptr)->rdlength = rdlength;
- TNET_DNS_RR(ptr)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* PTRDNAME */
- tnet_dns_rr_qname_deserialize(data, &(ptr->ptrdname), &offset);
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_ptr_dtor(tsk_object_t * self)
-{
- tnet_dns_ptr_t *ptr = self;
- if(ptr){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(ptr));
-
- TSK_FREE(ptr->ptrdname);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_ptr_def_s =
-{
- sizeof(tnet_dns_ptr_t),
- tnet_dns_ptr_ctor,
- tnet_dns_ptr_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_ptr_def_t = &tnet_dns_ptr_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_ptr.h b/branches/1.0/tinyNET/src/dns/tnet_dns_ptr.h
deleted file mode 100644
index 19e1882..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_ptr.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_ptr.h
- * @brief DNS Pointer record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_PTR_H
-#define TNET_DNS_RR_PTR_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-TNET_BEGIN_DECLS
-
-
-/** DNS PTR Resource Record
-*/
-typedef struct tnet_dns_ptr_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 1035 - 3.3.12. PTR RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / PTRDNAME /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- char* ptrdname;
-}
-tnet_dns_ptr_t;
-
-tnet_dns_ptr_t* tnet_dns_ptr_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void*data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_ptr_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_PTR_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_regexp.c b/branches/1.0/tinyNET/src/dns/tnet_dns_regexp.c
deleted file mode 100644
index e0e60d1..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_regexp.c
+++ /dev/null
@@ -1,508 +0,0 @@
-
-/* #line 1 "./ragel/tnet_dns_regexp.rl" */
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_regexp.h
- * @brief DNS Regex parser for NAPTR RR.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_regexp.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_ragel_state.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-/* === Ragel state machine === */
-
-/* #line 77 "./ragel/tnet_dns_regexp.rl" */
-
-
-/**
-* Apply @a regexp to @a e164num.
-* @param e164num Original E.164 number supplied by the user (only digits or '+' are accepted).
-* @param regexp A <character-string> containing a substitution expression that is
-* applied to the original string held by the client in order to
-* construct the next domain name to lookup. Example: "!^.*$!sip:bob@doubango.org!i".
-* @retval The final Internet address. It's up to the caller to free the string.
-*/
-char* tnet_dns_regex_parse(const char* e164num, const char* regexp)
-{
- char* ret = tsk_null;
- char* prefix = tsk_null;
- const char* tag_start;
- tsk_size_t e164len;
-
- // Ragel
- int cs = 0;
- const char *p = tag_start = regexp;
- const char *pe;
- const char *eof;
-
-
-/* #line 68 "./src/dns/tnet_dns_regexp.c" */
-static const char _tdns_machine_regexp_actions[] = {
- 0, 1, 0, 1, 1, 1, 2, 2,
- 0, 1, 2, 0, 2, 2, 2, 0,
- 2, 3, 0, 3, 3, 0, 2
-};
-
-static const char _tdns_machine_regexp_key_offsets[] = {
- 0, 0, 1, 2, 5, 6, 7, 8,
- 9, 10, 11, 13, 15, 17, 19, 21,
- 23, 25, 26, 27
-};
-
-static const char _tdns_machine_regexp_trans_keys[] = {
- 33, 94, 40, 46, 92, 40, 46, 42,
- 41, 36, 33, 33, 92, 33, 92, 48,
- 57, 33, 92, 33, 92, 40, 42, 36,
- 40, 40, 105, 0
-};
-
-static const char _tdns_machine_regexp_single_lengths[] = {
- 0, 1, 1, 3, 1, 1, 1, 1,
- 1, 1, 2, 2, 0, 2, 2, 2,
- 2, 1, 1, 0
-};
-
-static const char _tdns_machine_regexp_range_lengths[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0
-};
-
-static const char _tdns_machine_regexp_index_offsets[] = {
- 0, 0, 2, 4, 8, 10, 12, 14,
- 16, 18, 20, 23, 26, 28, 31, 34,
- 37, 40, 42, 44
-};
-
-static const char _tdns_machine_regexp_trans_targs[] = {
- 2, 0, 3, 0, 5, 15, 17, 4,
- 5, 4, 6, 0, 7, 0, 8, 0,
- 9, 0, 10, 0, 18, 12, 11, 18,
- 12, 11, 13, 0, 18, 0, 14, 18,
- 0, 14, 5, 16, 4, 9, 5, 4,
- 5, 4, 19, 0, 0, 0
-};
-
-static const char _tdns_machine_regexp_trans_actions[] = {
- 0, 0, 0, 0, 7, 1, 0, 1,
- 3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 10, 10, 10, 13,
- 13, 13, 0, 0, 19, 0, 16, 5,
- 0, 0, 3, 0, 0, 0, 3, 0,
- 7, 1, 0, 0, 0, 0
-};
-
-static const int tdns_machine_regexp_start = 1;
-static const int tdns_machine_regexp_first_final = 18;
-static const int tdns_machine_regexp_error = 0;
-
-static const int tdns_machine_regexp_en_main = 1;
-
-
-/* #line 101 "./ragel/tnet_dns_regexp.rl" */
-
- if(!e164num){
- goto bail;
- }
-
- if(!regexp){
- ret = tsk_strdup(e164num);
- goto bail;
- }
-
- e164len = tsk_strlen(e164num);
- pe = p + tsk_strlen(regexp);
- eof = pe;
-
-
-/* #line 147 "./src/dns/tnet_dns_regexp.c" */
- {
- cs = tdns_machine_regexp_start;
- }
-
-/* #line 116 "./ragel/tnet_dns_regexp.rl" */
-
-/* #line 154 "./src/dns/tnet_dns_regexp.c" */
- {
- int _klen;
- unsigned int _trans;
- const char *_acts;
- unsigned int _nacts;
- const char *_keys;
-
- if ( p == pe )
- goto _test_eof;
- if ( cs == 0 )
- goto _out;
-_resume:
- _keys = _tdns_machine_regexp_trans_keys + _tdns_machine_regexp_key_offsets[cs];
- _trans = _tdns_machine_regexp_index_offsets[cs];
-
- _klen = _tdns_machine_regexp_single_lengths[cs];
- if ( _klen > 0 ) {
- const char *_lower = _keys;
- const char *_mid;
- const char *_upper = _keys + _klen - 1;
- while (1) {
- if ( _upper < _lower )
- break;
-
- _mid = _lower + ((_upper-_lower) >> 1);
- if ( (*p) < *_mid )
- _upper = _mid - 1;
- else if ( (*p) > *_mid )
- _lower = _mid + 1;
- else {
- _trans += (_mid - _keys);
- goto _match;
- }
- }
- _keys += _klen;
- _trans += _klen;
- }
-
- _klen = _tdns_machine_regexp_range_lengths[cs];
- if ( _klen > 0 ) {
- const char *_lower = _keys;
- const char *_mid;
- const char *_upper = _keys + (_klen<<1) - 2;
- while (1) {
- if ( _upper < _lower )
- break;
-
- _mid = _lower + (((_upper-_lower) >> 1) & ~1);
- if ( (*p) < _mid[0] )
- _upper = _mid - 2;
- else if ( (*p) > _mid[1] )
- _lower = _mid + 2;
- else {
- _trans += ((_mid - _keys)>>1);
- goto _match;
- }
- }
- _trans += _klen;
- }
-
-_match:
- cs = _tdns_machine_regexp_trans_targs[_trans];
-
- if ( _tdns_machine_regexp_trans_actions[_trans] == 0 )
- goto _again;
-
- _acts = _tdns_machine_regexp_actions + _tdns_machine_regexp_trans_actions[_trans];
- _nacts = (unsigned int) *_acts++;
- while ( _nacts-- > 0 )
- {
- switch ( *_acts++ )
- {
- case 0:
-/* #line 42 "./ragel/tnet_dns_regexp.rl" */
- {
- tag_start = p;
- }
- break;
- case 1:
-/* #line 46 "./ragel/tnet_dns_regexp.rl" */
- {
- TSK_PARSER_SET_STRING(prefix);
- }
- break;
- case 2:
-/* #line 50 "./ragel/tnet_dns_regexp.rl" */
- {
- int len = (int)(p - tag_start);
- if(len){
- tsk_strncat(&ret, tag_start, len);
- }
- }
- break;
- case 3:
-/* #line 57 "./ragel/tnet_dns_regexp.rl" */
- {
- if(prefix){
- int prefixlen = tsk_strlen(prefix);
- tsk_strncat(&ret, e164num + prefixlen, (e164len - prefixlen));
- }
- }
- break;
-/* #line 257 "./src/dns/tnet_dns_regexp.c" */
- }
- }
-
-_again:
- if ( cs == 0 )
- goto _out;
- if ( ++p != pe )
- goto _resume;
- _test_eof: {}
- _out: {}
- }
-
-/* #line 117 "./ragel/tnet_dns_regexp.rl" */
-
- if( cs <
-/* #line 273 "./src/dns/tnet_dns_regexp.c" */
-18
-/* #line 118 "./ragel/tnet_dns_regexp.rl" */
- ){
- TSK_DEBUG_ERROR("regexp substitition failed.");
- TSK_FREE(ret);
- }
-
-bail:
- TSK_FREE(prefix);
-
- return ret;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-///*
-//* Copyright (C) 2009-2010 Mamadou Diop.
-//*
-//* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-//*
-//* This file is part of Open Source Doubango Framework.
-//*
-//* DOUBANGO 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.
-//*
-//* DOUBANGO 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 DOUBANGO.
-//*
-//*/
-///**@file tnet_dns_regexp.h
-// * @brief DNS Regex parser for NAPTR RR.
-// *
-// * @author Mamadou Diop <diopmamadou(at)doubango.org>
-// *
-// * @date Created: Sat Nov 8 16:54:58 2009 mdiop
-// */
-//#include "tnet_dns_regexp.h"
-//
-//#include "tsk_debug.h"
-//#include "tsk_memory.h"
-//#include "tsk_string.h"
-//#include "tsk_list.h"
-//
-//#include <string.h>
-//
-//const tsk_object_def_t *group_def_t;
-//typedef tsk_list_t groups_L_t;
-//
-//#define CREATE_GROUP(id) tsk_object_new(group_def_t, (int)id)
-//typedef struct group_s
-//{
-// TSK_DECLARE_OBJECT;
-//
-// int id;
-// tsk_size_t start;
-// tsk_size_t end;
-//}
-//group_t;
-//
-///* === Ragel state machine === */
-//%%{
-// machine tdns_machine_regexp;
-//
-// action tag{
-// tag_start = p;
-// }
-//
-// action inc_index{
-// index++;
-// TSK_DEBUG_INFO("inc_index %d", index);
-// }
-//
-// action create_group{
-// if(curr_group){
-// TSK_OBJECT_SAFE_FREE(curr_group);
-// }
-// curr_group = CREATE_GROUP(++group_id);
-// curr_group->start = index;
-// TSK_DEBUG_INFO("Create groupe");
-// }
-//
-// action add_group{
-// curr_group->end = index;
-// tsk_list_push_back_data(groups, (void**)&curr_group);
-// TSK_DEBUG_INFO("Create groupe");
-// }
-//
-// # http://www.itu.int/itudoc/itu-t/workshop/enum/012_pp7.ppt
-// # The format is like this: !<regexp>!<string>!
-// # * 1. Match <regexp> on the original E.164 number
-// # * 2. Apply rewrite rule <string>
-// # * \n in <string> is replaced with group number 'n' in <regexp>
-// #
-//
-// # Match beginning
-// m_begin = "^" any* $inc_index;
-//
-// # Match end
-// m_end = "$";
-//
-// # Math any character
-// m_any_c = ".";
-//
-// # Match any number of any character
-// m_any_string = ".*" | ".+";
-//
-// # Grouping
-// group_n = "\\" digit+;
-// group_begin = "(" >create_group;
-// group_end = ")" >add_group;
-// group = group_begin<: any* :>group_end;
-//
-// # Escaped char
-// escaped_char = "\\" alpha;
-//
-// regexp =
-// m_begin<:
-// m_any_c | m_any_string | group
-// :>m_end;
-//
-// string = any*;
-//
-// main := "!"<: regexp :> "!" <: string :> "!";
-//}%%
-//
-///**
-//* Apply @a regexp to @a e164num.
-//* @param e164num Original E.164 number supplied by the user (only digits or '+' are accepted).
-//* @param regexp A <character-string> containing a substitution expression that is
-//* applied to the original string held by the client in order to
-//* construct the next domain name to lookup. Example: "!^.*$!sip:bob@doubango.org!i".
-//* @retval The final Internet address. It's up to the caller to free the string.
-//*/
-//char* tnet_dns_regex_parse(const char* e164num, const char* regexp)
-//{
-// char* ret = tsk_null;
-// groups_L_t* groups = tsk_list_create();
-// group_t* curr_group = tsk_null;
-// tsk_size_t index = 0;
-// int group_id = 0;
-//
-// // Ragel
-// int cs = 0;
-// const char *p = regexp;
-// const char *pe;
-// const char *eof;
-//
-// %%write data;
-//
-// if(!e164num){
-// goto bail;
-// }
-//
-// if(!regexp){
-// ret = tsk_strdup(e164num);
-// goto bail;
-// }
-//
-// pe = p + tsk_strlen(regexp);
-// eof = pe;
-//
-// %%write init;
-// %%write exec;
-//
-// if( cs < %%{ write first_final; }%% ){
-// TSK_DEBUG_ERROR("regexp substitition failed.");
-// TSK_FREE(ret);
-// }
-//
-//bail:
-// TSK_OBJECT_SAFE_FREE(groups);
-// if(curr_group){
-// TSK_OBJECT_SAFE_FREE(curr_group);
-// }
-//
-// return ret;
-//}
-//
-////=================================================================================================
-//// String object definition
-////
-//static tsk_object_t* group_create(tsk_object_t * self, va_list * app)
-//{
-// group_t *g = self;
-// if(g){
-// g->id = va_arg(*app, int);
-// }
-// return self;
-//}
-//
-//static tsk_object_t* group_destroy(tsk_object_t * self)
-//{
-// group_t *g = self;
-// if(g){
-// }
-//
-// return self;
-//}
-//
-//static int group_cmp(const tsk_object_t *_g1, const tsk_object_t *_g2)
-//{
-// const group_t *g1 = _g1;
-// const group_t *g2 = _g2;
-//
-// if(g1 && g22){
-// return (g1->id - g2->id);
-// }
-// else if(!g1 && !g2) return 0;
-// else return -1;
-//}
-//
-//static const tsk_object_def_t group_def_s =
-//{
-// sizeof(group_t),
-// group_create,
-// group_destroy,
-// group_cmp,
-//};
-//const tsk_object_def_t *group_def_t = &group_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_regexp.h b/branches/1.0/tinyNET/src/dns/tnet_dns_regexp.h
deleted file mode 100644
index 371cc27..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_regexp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_regexp.h
- * @brief DNS Regexp parser for NAPTR RR.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_REGEX_H
-#define TNET_DNS_REGEX_H
-
-#include "tinynet_config.h"
-
-TNET_BEGIN_DECLS
-
-TINYNET_API char* tnet_dns_regex_parse(const char* e164num, const char* regexp);
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_REGEX_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.c b/branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.c
deleted file mode 100644
index 887ecfc..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.c
+++ /dev/null
@@ -1,301 +0,0 @@
-
-/* #line 1 "./ragel/tnet_dns_resolvconf.rl" */
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_resolvconf.c
- * @brief Parser for "/etc/resolv.conf" file to retrive DNS servers.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_resolvconf.h"
-
-#include "tnet_utils.h"
-
-#include "dns/tnet_dns.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_ragel_state.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-
-/* === Ragel state machine === */
-
-/* #line 80 "./ragel/tnet_dns_resolvconf.rl" */
-
-
-/** Gets list of DNS servers from a conf file.
-* @param path Path of the conf file from which to retrieve the DNS servers.
-* should be @a "/etc/resolv.conf". You can adjust the value by modifying @ref TNET_RESOLV_CONF_PATH.<br>
-* If you are using <b>Android</b> and the resolv.conf file is missing, then run the following line in a command window: <br>
-* <i>ln -s /private/var/run/resolv.conf /etc/resolv.conf</i><br> If this fails, then try to manually add the file.
-* @retval List of DNS servers.
-*/
-tnet_addresses_L_t * tnet_dns_resolvconf_parse(const char* path)
-{
- tnet_addresses_L_t* servers = tsk_null;
- tnet_ip_t ip;
- const char* fullpath = path;
- const char* tag_start;
- FILE* fd;
- char buf[4092];
-
- // Ragel
- int cs = 0;
- const char *p;
- const char *pe;
- const char *eof;
-
-
-/* #line 74 "./src/dns/tnet_dns_resolvconf.c" */
-static const char _tdns_machine_resolvconf_actions[] = {
- 0, 1, 0, 1, 1
-};
-
-static const char _tdns_machine_resolvconf_key_offsets[] = {
- 0, 6, 7, 8, 11, 14, 14, 20,
- 22, 25, 28, 31, 34, 37, 40, 43,
- 46, 49, 50, 51, 54
-};
-
-static const char _tdns_machine_resolvconf_trans_keys[] = {
- 10, 13, 32, 35, 78, 110, 32, 32,
- 10, 13, 32, 10, 13, 32, 10, 13,
- 32, 35, 78, 110, 10, 13, 32, 65,
- 97, 32, 77, 109, 32, 69, 101, 32,
- 83, 115, 32, 69, 101, 32, 82, 114,
- 32, 86, 118, 32, 69, 101, 32, 82,
- 114, 32, 32, 10, 13, 32, 32, 35,
- 78, 110, 0
-};
-
-static const char _tdns_machine_resolvconf_single_lengths[] = {
- 6, 1, 1, 3, 3, 0, 6, 2,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 1, 1, 3, 4
-};
-
-static const char _tdns_machine_resolvconf_range_lengths[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0
-};
-
-static const char _tdns_machine_resolvconf_index_offsets[] = {
- 0, 7, 9, 11, 15, 19, 20, 27,
- 30, 34, 38, 42, 46, 50, 54, 58,
- 62, 66, 68, 70, 74
-};
-
-static const char _tdns_machine_resolvconf_indicies[] = {
- 1, 1, 2, 3, 4, 4, 0, 5,
- 0, 5, 6, 7, 7, 8, 6, 7,
- 7, 8, 9, 9, 1, 1, 5, 3,
- 4, 4, 0, 7, 7, 3, 5, 10,
- 10, 0, 5, 11, 11, 0, 5, 12,
- 12, 0, 5, 13, 13, 0, 5, 14,
- 14, 0, 5, 15, 15, 0, 5, 16,
- 16, 0, 5, 17, 17, 0, 5, 18,
- 18, 0, 19, 0, 19, 20, 22, 22,
- 23, 21, 2, 3, 4, 4, 0, 0
-};
-
-static const char _tdns_machine_resolvconf_trans_targs[] = {
- 1, 6, 20, 7, 8, 2, 3, 0,
- 4, 5, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 19, 0, 4
-};
-
-static const char _tdns_machine_resolvconf_trans_actions[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 3, 3
-};
-
-static const int tdns_machine_resolvconf_start = 0;
-static const int tdns_machine_resolvconf_first_final = 0;
-static const int tdns_machine_resolvconf_error = -1;
-
-static const int tdns_machine_resolvconf_en_main = 0;
-
-
-/* #line 105 "./ragel/tnet_dns_resolvconf.rl" */
-
- if(tsk_strnullORempty(fullpath)){
- fullpath = TNET_RESOLV_CONF_PATH;
- }
-
- /* Open the file and read all data */
- if((fd = fopen(fullpath, "r"))){
- int len = fread(buf, sizeof(uint8_t), sizeof(buf)-2, fd);
- p = &buf[0];
- pe = p + len + 1/*hack*/;
- eof = pe;
- fclose(fd);
-
- buf[len] = '\n'; // hack to have perfect lines
-
- servers = tsk_list_create();
- }
- else{
-#if ANDROID
- TSK_DEBUG_INFO("Failed to open [%s]. But don't panic, we have detected that you are using Google Android System.\n"
- "You should look at the Progammer's Guide for more information.\n If you are not using DNS functions, don't worry about this warning.",
- fullpath);
-#else
- TSK_DEBUG_ERROR("Failed to open %s.", fullpath);
-#endif
- goto bail;
- }
-
-
-/* #line 176 "./src/dns/tnet_dns_resolvconf.c" */
- {
- cs = tdns_machine_resolvconf_start;
- }
-
-/* #line 134 "./ragel/tnet_dns_resolvconf.rl" */
-
-/* #line 183 "./src/dns/tnet_dns_resolvconf.c" */
- {
- int _klen;
- unsigned int _trans;
- const char *_acts;
- unsigned int _nacts;
- const char *_keys;
-
- if ( p == pe )
- goto _test_eof;
-_resume:
- _keys = _tdns_machine_resolvconf_trans_keys + _tdns_machine_resolvconf_key_offsets[cs];
- _trans = _tdns_machine_resolvconf_index_offsets[cs];
-
- _klen = _tdns_machine_resolvconf_single_lengths[cs];
- if ( _klen > 0 ) {
- const char *_lower = _keys;
- const char *_mid;
- const char *_upper = _keys + _klen - 1;
- while (1) {
- if ( _upper < _lower )
- break;
-
- _mid = _lower + ((_upper-_lower) >> 1);
- if ( (*p) < *_mid )
- _upper = _mid - 1;
- else if ( (*p) > *_mid )
- _lower = _mid + 1;
- else {
- _trans += (_mid - _keys);
- goto _match;
- }
- }
- _keys += _klen;
- _trans += _klen;
- }
-
- _klen = _tdns_machine_resolvconf_range_lengths[cs];
- if ( _klen > 0 ) {
- const char *_lower = _keys;
- const char *_mid;
- const char *_upper = _keys + (_klen<<1) - 2;
- while (1) {
- if ( _upper < _lower )
- break;
-
- _mid = _lower + (((_upper-_lower) >> 1) & ~1);
- if ( (*p) < _mid[0] )
- _upper = _mid - 2;
- else if ( (*p) > _mid[1] )
- _lower = _mid + 2;
- else {
- _trans += ((_mid - _keys)>>1);
- goto _match;
- }
- }
- _trans += _klen;
- }
-
-_match:
- _trans = _tdns_machine_resolvconf_indicies[_trans];
- cs = _tdns_machine_resolvconf_trans_targs[_trans];
-
- if ( _tdns_machine_resolvconf_trans_actions[_trans] == 0 )
- goto _again;
-
- _acts = _tdns_machine_resolvconf_actions + _tdns_machine_resolvconf_trans_actions[_trans];
- _nacts = (unsigned int) *_acts++;
- while ( _nacts-- > 0 )
- {
- switch ( *_acts++ )
- {
- case 0:
-/* #line 47 "./ragel/tnet_dns_resolvconf.rl" */
- {
- tag_start = p;
- }
- break;
- case 1:
-/* #line 51 "./ragel/tnet_dns_resolvconf.rl" */
- {
- int len = (int)(p - tag_start);
- if(len && len<=sizeof(ip)){
- tnet_address_t *address;
- memset(ip, '\0', sizeof(ip));
- memcpy(ip, tag_start, len);
-
- address = tnet_address_create(ip);
- address->family = tnet_get_family(ip, TNET_DNS_SERVER_PORT_DEFAULT);
- address->dnsserver = 1;
- tsk_list_push_ascending_data(servers, (void**)&address);
- }
- }
- break;
-/* #line 277 "./src/dns/tnet_dns_resolvconf.c" */
- }
- }
-
-_again:
- if ( ++p != pe )
- goto _resume;
- _test_eof: {}
- }
-
-/* #line 135 "./ragel/tnet_dns_resolvconf.rl" */
-
- if( cs <
-/* #line 290 "./src/dns/tnet_dns_resolvconf.c" */
-0
-/* #line 136 "./ragel/tnet_dns_resolvconf.rl" */
- ){
- TSK_DEBUG_ERROR("Failed to parse %s.", fullpath);
- TSK_OBJECT_SAFE_FREE(servers);
- }
-
-bail:
- return servers;
-}
-
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.h b/branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.h
deleted file mode 100644
index b13e092..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_resolvconf.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_resolvconf.h
- * @brief Parser for "/etc/resolv.conf" file to retrive DNS servers.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RESOLVCONF_H
-#define TNET_DNS_RESOLVCONF_H
-
-#include "tinynet_config.h"
-
-#include "tnet_types.h"
-
-TNET_BEGIN_DECLS
-
-TINYNET_API tnet_addresses_L_t * tnet_dns_resolvconf_parse(const char* path);
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RESOLVCONF_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_rr.c b/branches/1.0/tinyNET/src/dns/tnet_dns_rr.c
deleted file mode 100644
index ddf3682..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_rr.c
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_rr.c
- * @brief DNS Resource Record (RFC 1034 and 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_rr.h"
-
-#include "tnet_dns_a.h"
-#include "tnet_dns_aaaa.h"
-#include "tnet_dns_cname.h"
-#include "tnet_dns_mx.h"
-#include "tnet_dns_naptr.h"
-#include "tnet_dns_ns.h"
-#include "tnet_dns_opt.h"
-#include "tnet_dns_ptr.h"
-#include "tnet_dns_soa.h"
-#include "tnet_dns_srv.h"
-#include "tnet_dns_txt.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_memory.h"
-#include "tsk_debug.h"
-#include "tsk_string.h"
-
-#include <string.h> /* strtok, strlen ... */
-
-
-/** Creates a new DNS RR.
-*/
-
-tnet_dns_rr_t* tnet_dns_rr_create()
-{
- return tsk_object_new(tnet_dns_rr_def_t);
-}
-
-/** Initializes any DNS RR (either NAPTR or SRV ...).
-* @param rr The DNS RR to initialize.
-* @param qtype The type of the RR.
-* @param qclass The class of the RR.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_dns_rr_init(tnet_dns_rr_t *rr, tnet_dns_qtype_t qtype, tnet_dns_qclass_t qclass)
-{
- if(rr){
- if(!rr->initialized){
- rr->qtype = qtype;
- rr->qclass = qclass;
-
- rr->initialized = tsk_true;
- return 0;
- }
- return -2;
- }
- return -1;
-}
-
-/** Deinitializes any DNS RR (either NAPTR or SRV ...).
-* @param rr The DNS RR to deinitialize.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_dns_rr_deinit(tnet_dns_rr_t *rr)
-{
- if(rr){
- if(rr->initialized){
- TSK_FREE(rr->name);
- TSK_FREE(rr->rpdata);
-
- rr->initialized = tsk_false;
- return 0;
- }
- return -2;
- }
- return -1;
-}
-
-/** Deserialize <character-string>.
-*/
-int tnet_dns_rr_charstring_deserialize(const void* data, char** charstring, tsk_size_t *offset)
-{
- /* RFC 1035 - 3.3. Standard RRs
- <character-string> is a single length octet followed by that number of characters.
- <character-string> is treated as binary information, and can be up to 256 characters in
- length (including the length octet).
- */
- uint8_t* dataPtr = (((uint8_t*)data)+ *offset);
- uint8_t length = *dataPtr;
-
- *charstring = tsk_strndup((const char*)(dataPtr + 1), length);
- *offset += (1 + length);
-
- return 0;
-}
-
-/** Deserializes a QName.
-*/
-int tnet_dns_rr_qname_deserialize(const void* data, char** name, tsk_size_t *offset)
-{
- /* RFC 1035 - 4.1.4. Message compression
-
- The pointer takes the form of a two octet sequence:
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | 1 1| OFFSET |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- uint8_t* dataPtr = (((uint8_t*)data) + *offset);
- unsigned usingPtr = 0; /* Do not change. */
-
- while(*dataPtr){
- usingPtr = ((*dataPtr & 0xC0) == 0xC0);
-
- if(usingPtr){
- tsk_size_t ptr_offset = (*dataPtr & 0x3F);
- ptr_offset = ptr_offset << 8 | *(dataPtr+1);
-
- *offset += 2;
- return tnet_dns_rr_qname_deserialize(data, name, &ptr_offset);
- }
- else{
- uint8_t length;
-
- if(*name){
- tsk_strcat(name, ".");
- }
-
- length = *dataPtr;
- *offset+=1, dataPtr++;
-
- tsk_strncat(name, (const char*)dataPtr, length);
- *offset += length, dataPtr += length;
- }
- }
-
- *offset+=1;
-
- return 0;
-}
-
-//int tnet_dns_rr_qname_deserialize(const void* data, tsk_size_t size, char** name, tsk_size_t *offset)
-//{
-// /* RFC 1035 - 4.1.4. Message compression
-//
-// The pointer takes the form of a two octet sequence:
-// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
-// | 1 1| OFFSET |
-// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
-// */
-// uint8_t* dataPtr = (((uint8_t*)data) + *offset);
-// uint8_t* dataEnd = (dataPtr + size);
-// unsigned usingPtr = 0; /* Do not change. */
-// unsigned islast = 0;
-//
-// while(!islast)
-// {
-// usingPtr = ((*dataPtr & 0xC0) == 0xC0);
-//
-// if(usingPtr)
-// {
-// uint8_t *Ptr;
-// uint16_t ptr_offset = (*dataPtr & 0x3F);
-// ptr_offset = ptr_offset << 8 | *(dataPtr+1);
-// Ptr = ((uint8_t*)data) + ptr_offset;
-//
-// tnet_qname_label_parse(Ptr, (dataEnd - Ptr), name, &islast);
-// *offset += 2, dataPtr += 2;
-// }
-// else
-// {
-// tsk_size_t length = tnet_qname_label_parse(dataPtr, size, name, &islast);
-// *offset += length, dataPtr += length;
-// }
-// }
-//
-// *offset += usingPtr ? 0 : 1;
-//
-// return 0;
-//}
-
-/** Serializes a QName.
-*/
-int tnet_dns_rr_qname_serialize(const char* qname, tsk_buffer_t* output)
-{
- /*
- QNAME a domain name represented as a sequence of labels, where
- each label consists of a length octet followed by that
- number of octets. The domain name terminates with the
- zero length octet for the null label of the root. Note
- that this field may be an odd number of octets; no
- padding is used.
-
- Example: "doubango.com" ==> 8doubango3comNULL
- */
- static uint8_t null = 0;
-
- if(qname){
- char* _qname = tsk_strdup(qname);
- char* label = strtok(_qname, ".");
-
- while(label){
- uint8_t length = tsk_strlen(label);
- tsk_buffer_append(output, &length, 1);
- tsk_buffer_append(output, label, tsk_strlen(label));
-
- label = strtok (tsk_null, ".");
- }
-
- TSK_FREE(_qname);
- }
-
- /* terminates domain name */
- tsk_buffer_append(output, &null, 1);
-
- return 0;
-}
-
-/** Deserializes a DNS RR.
-*/
-tnet_dns_rr_t* tnet_dns_rr_deserialize(const void* data, tsk_size_t size, tsk_size_t* offset)
-{
- tnet_dns_rr_t *rr = tsk_null;
- uint8_t* dataStart = (uint8_t*)data;
- uint8_t* dataPtr = (dataStart + *offset);
- //uint8_t* dataEnd = (dataPtr+size);
- tnet_dns_qtype_t qtype;
- tnet_dns_qclass_t qclass;
- uint32_t ttl;
- uint16_t rdlength;
- char* qname = tsk_null;
-
- /* Check validity */
- if(!dataPtr || !size){
- goto bail;
- }
-
- /* == Parse QNAME == */
- tnet_dns_rr_qname_deserialize(dataStart, &qname, offset);
- dataPtr = (dataStart + *offset);
- /* == Parse QTYPE == */
- qtype = (tnet_dns_qtype_t)tnet_ntohs_2(dataPtr);
- dataPtr += 2, *offset += 2;
- /* == Parse QCLASS == */
- qclass = (tnet_dns_qclass_t)tnet_ntohs_2(dataPtr);
- dataPtr += 2, *offset += 2;
- /* == Parse TTL == */
- ttl = tnet_htonl_2(dataPtr);
- dataPtr += 4, *offset += 4;
- /* == Parse RDLENGTH == */
- rdlength = tnet_ntohs_2(dataPtr);
- dataPtr += 2, *offset += 2;
-
- switch(qtype){
- case qtype_a:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_a_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_aaaa:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_aaaa_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_cname:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_cname_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_mx:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_mx_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_naptr:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_naptr_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_ns:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_ns_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_opt:
- {
- unsigned payload_size = qclass;
- rr = (tnet_dns_rr_t *)tnet_dns_opt_create(payload_size);
- break;
- }
-
- case qtype_ptr:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_ptr_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_soa:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_soa_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_srv:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_srv_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- case qtype_txt:
- {
- rr = (tnet_dns_rr_t *)tnet_dns_txt_create(qname, qclass, ttl, rdlength, dataStart, *offset);
- break;
- }
-
- default:
- {
- TSK_DEBUG_ERROR("NOT IMPLEMENTED");
- break;
- }
- }
-
-bail:
- TSK_FREE(qname);
-
- *offset += rdlength;
- return rr;
-}
-
-/** Serializes a DNS RR.
-*/
-int tnet_dns_rr_serialize(const tnet_dns_rr_t* rr, tsk_buffer_t *output)
-{
- if(!rr || !output){
- return -1;
- }
-
- /*=== NAME ===*/
- {
- tnet_dns_rr_qname_serialize(rr->name, output);
- }
-
- /*=== TYPE ===*/
- {
- uint16_t qtype = tnet_htons(rr->qtype);
- tsk_buffer_append(output, &(qtype), 2);
- }
-
- /*=== CLASS ===*/
- {
- uint16_t qclass = tnet_htons(rr->qclass);
- tsk_buffer_append(output, &(qclass), 2);
- }
-
- /*=== TTL ===*/
- {
- uint32_t ttl = tnet_htonl(rr->ttl);
- tsk_buffer_append(output, &(ttl), 4);
- }
-
- /*=== RDLENGTH ===*/
- {
- uint16_t length = tnet_htons(rr->rdlength);
- tsk_buffer_append(output, &(length), 2);
- }
-
- /*=== RDATA : Request never contains data
- ===*/
- if(!rr->rpdata){
- goto done;
- }
-
- switch(rr->qtype){
- case qtype_a:
- case qtype_aaaa:
- case qtype_cname:
- case qtype_mx:
- case qtype_naptr:
- case qtype_ns:
- case qtype_opt:
- case qtype_ptr:
- case qtype_soa:
- case qtype_srv:
- case qtype_txt:
- default:
- {
- TSK_DEBUG_WARN("DNS Request should not contains RDATA (not supported).");
- break;
- }
- }
-
-done:
- return 0;
-}
-
-
-//=================================================================================================
-// [[DNS RR]] object definition
-//
-static tsk_object_t* tnet_dns_rr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_rr_t *rr = self;
- if(rr){
- tnet_dns_rr_init(rr, qtype_any, qclass_any);
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_rr_dtor(tsk_object_t * self)
-{
- tnet_dns_rr_t *rr = self;
- if(rr){
- tnet_dns_rr_deinit(rr);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_rr_def_s =
-{
- sizeof(tnet_dns_rr_t),
- tnet_dns_rr_ctor,
- tnet_dns_rr_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_rr_def_t = &tnet_dns_rr_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_rr.h b/branches/1.0/tinyNET/src/dns/tnet_dns_rr.h
deleted file mode 100644
index f3fcbc0..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_rr.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_rr.h
- * @brief DNS Resource Record (RFCS 1034 and 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_DNS_RR_H
-#define TNET_DNS_RR_H
-
-#include "tinynet_config.h"
-
-#include "tsk_list.h"
-#include "tsk_buffer.h"
-
-/** @def TNET_DNS_RR
-* Converts any DNS RR to a pointer to @ref tnet_dns_rr_t.
-* @retval A pointer to @ref tnet_dns_rr_t object.
-*/
-TNET_BEGIN_DECLS
-
-#define TNET_DNS_RR(self) ((tnet_dns_rr_t*)(self))
-
-/** RFC 1035 - 3.2.2. TYPE values
-* @sa http://en.wikipedia.org/wiki/List_of_DNS_record_types
-*/
-typedef enum tnet_dns_qtype_e
-{
- qtype_a = 1, /**< A 1 a host address */
- qtype_ns = 2, /**< NS 2 an authoritative name server */
- qtype_md = 3, /**< MD 3 a mail destination (Obsolete - use MX) */
- qtype_mf = 4, /**< MF 4 a mail forwarder (Obsolete - use MX) */
- qtype_cname = 5, /**< CNAME 5 the canonical name for an alias */
- qtype_soa = 6, /**< SOA 6 marks the start of a zone of authority */
- qtype_mb = 7, /**< MB 7 a mailbox domain name (EXPERIMENTAL) */
- qtype_mg = 8, /**< MG 8 a mail group member (EXPERIMENTAL) */
- qtype_mr = 9, /**< MR 9 a mail rename domain name (EXPERIMENTAL) */
- qtype_null = 10, /**< NULL 10 a null RR (EXPERIMENTAL) */
- qtype_wks = 11, /**< WKS 11 a well known service description */
- qtype_ptr = 12, /**< PTR 12 a domain name pointer */
- qtype_hinfo = 13, /**< HINFO 13 host information */
- qtype_minfo = 14, /**< MINFO 14 mailbox or mail list information */
- qtype_mx = 15, /**< MX 15 mail exchange */
- qtype_txt = 16, /**< TXT 16 text strings */
-
- qtype_aaaa = 28, /**< AAAA 28 IPv6 host address */
-
- qtype_srv = 33, /**< SRV 33 Service locator */
-
- qtype_naptr = 35, /**< NAPTR 35 Naming Authority Pointer */
-
- qtype_opt = 41, /**< OPT 41 Option */
-
- qtype_ipseckey = 45,/**< IPSECKEY 45 IPSEC Key */
-
- qtype_spf = 99, /**< SPF 99 SPF record */
-
- qtype_any = 255 /**< * 255 A request for all records (3.2.3. QTYPE values)*/
-}
-tnet_dns_qtype_t;
-
-/** RFC 1035 - 3.2.4. CLASS values
-*/
-typedef enum tnet_dns_qclass_e
-{
- qclass_in = 1, /**< IN 1 the Internet */
- qclass_ics = 2, /**< CS 2 the CSNET class (Obsolete - used only for examples in some obsolete RFCs) */
- qclass_ch = 3, /**< CH 3 the CHAOS class */
- qclass_hs = 4, /**< HS 4 Hesiod [Dyer 87] */
-
- qclass_any = 255 /**< * 255 any class (3.2.5. QCLASS values) */
-}
-tnet_dns_qclass_t;
-
-/** RFC 1034 (3.6. Resource Records) and 1035 (3.2.1. Format)
-*/
-typedef struct tnet_dns_rr_s
-{
- TSK_DECLARE_OBJECT;
-
- /* RFC 1035 - 3.2.1. Format
- 1 1 1 1 1 1
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | |
- / /
- / NAME /
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | TYPE |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | CLASS |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | TTL |
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | RDLENGTH |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
- / RDATA /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
-
- tsk_bool_t initialized;
-
- /** An owner name, i.e., the name of the node to which this resource record pertains. */
- char* name;
-
- /** Two octets containing one of the RR TYPE codes. */
- tnet_dns_qtype_t qtype;
-
- /** Two octets containing one of the RR CLASS codes. */
- tnet_dns_qclass_t qclass;
-
- /** A 32 bit signed integer that specifies the time interval (seconds) that the resource record may be cached before the source
- of the information should again be consulted.
- Zero values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached.
- For example, SOA records are always distributed with a zero TTL to prohibit caching. Zero values can also be used for extremely volatile data. */
- int32_t ttl;
-
- /** An unsigned 16 bit integer that specifies the length in octets of the RDATA field. */
- uint16_t rdlength;
-
- /** A variable length string of octets that describes the resource.
- The format of this information varies according to the TYPE and CLASS of the resource record.*/
- void *rpdata;
-}
-tnet_dns_rr_t;
-
-#define TNET_DECLARE_DNS_RR tnet_dns_rr_t dns_rr
-
-typedef tsk_list_t tnet_dns_rrs_L_t; /**< List of @ref tnet_dns_rr_t elements. */
-
-int tnet_dns_rr_init(tnet_dns_rr_t *rr, tnet_dns_qtype_t qtype, tnet_dns_qclass_t qclass);
-int tnet_dns_rr_deinit(tnet_dns_rr_t *rr);
-
-int tnet_dns_rr_charstring_deserialize(const void* data, char** name, tsk_size_t *offset);
-
-int tnet_dns_rr_qname_deserialize(const void* data, char** name, tsk_size_t *offset);
-int tnet_dns_rr_qname_serialize(const char* qname, tsk_buffer_t* output);
-
-tnet_dns_rr_t* tnet_dns_rr_deserialize(const void* data, tsk_size_t size, tsk_size_t* offset);
-int tnet_dns_rr_serialize(const tnet_dns_rr_t* rr, tsk_buffer_t *output);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_rr_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_H */
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_soa.c b/branches/1.0/tinyNET/src/dns/tnet_dns_soa.c
deleted file mode 100644
index 0b8be15..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_soa.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_soa.c
- * @brief DNS Start Of Authority record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_soa.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-tnet_dns_soa_t* tnet_dns_soa_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_soa_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-//=================================================================================================
-// [[DNS SOA]] object definition
-//
-static tsk_object_t* tnet_dns_soa_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_soa_t *soa = self;
- if(soa){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(soa), qtype_soa, qclass);
- TNET_DNS_RR(soa)->name = tsk_strdup(name);
- TNET_DNS_RR(soa)->rdlength = rdlength;
- TNET_DNS_RR(soa)->ttl = ttl;
-
- if(rdlength)
- { // ==> DESERIALIZATION
- /* MNAME */
- tnet_dns_rr_qname_deserialize(data, &(soa->mname), &offset);
- /* RNAME */
- tnet_dns_rr_qname_deserialize(data, &(soa->rname), &offset);
- /* SERIAL */
- soa->serial = tnet_htonl_2(((uint8_t*)data) + offset),
- offset += 2;
- /* REFRESH */
- soa->refresh = tnet_htonl_2(((uint8_t*)data) + offset),
- offset += 2;
- /* RETRY */
- soa->retry = tnet_htonl_2(((uint8_t*)data) + offset),
- offset += 2;
- /* EXPIRE */
- soa->expire = tnet_htonl_2(((uint8_t*)data) + offset),
- offset += 2;
- /* MINIMUM */
- soa->minimum = tnet_htonl_2(((uint8_t*)data) + offset),
- offset += 2;
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_soa_dtor(tsk_object_t * self)
-{
- tnet_dns_soa_t *soa = self;
- if(soa){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(soa));
-
- TSK_FREE(soa->mname);
- TSK_FREE(soa->rname);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_soa_def_s =
-{
- sizeof(tnet_dns_soa_t),
- tnet_dns_soa_ctor,
- tnet_dns_soa_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_soa_def_t = &tnet_dns_soa_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_soa.h b/branches/1.0/tinyNET/src/dns/tnet_dns_soa.h
deleted file mode 100644
index eb88989..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_soa.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_soa.h
- * @brief DNS Start Of Authority record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_SOA_H
-#define TNET_DNS_RR_SOA_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-TNET_BEGIN_DECLS
-
-typedef struct tnet_dns_soa_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 1035 - 3.3.13. SOA RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / MNAME /
- / /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / RNAME /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | SERIAL |
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | REFRESH |
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | RETRY |
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | EXPIRE |
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- | MINIMUM |
- | |
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- char* mname;
- char* rname;
- uint32_t serial;
- uint32_t refresh;
- uint32_t retry;
- uint32_t expire;
- uint32_t minimum;
-}
-tnet_dns_soa_t;
-
-tnet_dns_soa_t* tnet_dns_soa_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_soa_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_SOA_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_srv.c b/branches/1.0/tinyNET/src/dns/tnet_dns_srv.c
deleted file mode 100644
index 2fc8f41..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_srv.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_srv.c
- * @brief DNS SeRVice locator record - RR - (RFC 2782).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_srv.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-/** Creates new DNS SRV Resource Record.
-*/
-tnet_dns_srv_t* tnet_dns_srv_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_srv_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-//=================================================================================================
-// [[DNS SRV]] object definition
-//
-static tsk_object_t* tnet_dns_srv_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_srv_t *srv = self;
- if(srv){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(srv), qtype_srv, qclass);
- TNET_DNS_RR(srv)->name = tsk_strdup(name);
- TNET_DNS_RR(srv)->rdlength = rdlength;
- TNET_DNS_RR(srv)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* Priority */
- srv->priority = tnet_ntohs_2(((uint8_t*)data) + offset),
- offset += 2;
- /* Weight */
- srv->weight = tnet_ntohs_2(((uint8_t*)data) + offset),
- offset += 2;
- /* Port */
- srv->port = tnet_ntohs_2(((uint8_t*)data) + offset),
- offset += 2;
- /* Target */
- tnet_dns_rr_qname_deserialize(data, &(srv->target), &offset);
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_srv_dtor(tsk_object_t * self)
-{
- tnet_dns_srv_t *srv = self;
- if(srv){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(srv));
-
- TSK_FREE(srv->target);
- }
- return self;
-}
-
-static int tnet_dns_srv_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2)
-{
- const tnet_dns_rr_t* rr1 = obj1;
- const tnet_dns_rr_t* rr2 = obj2;
-
- if(rr1 && rr2 && (rr1->qtype==qtype_srv) && (rr2->qtype==qtype_srv)){
- const tnet_dns_srv_t* srv1 = (tnet_dns_srv_t*)rr1;
- const tnet_dns_srv_t* srv2 = (tnet_dns_srv_t*)rr2;
-
- /* Compare priorities. */
- if(srv1->priority < srv2->priority){ /* Lowest priority is tried first. */
- return 1;
- }
- else if(srv1->priority > srv2->priority){
- return -1;
- }
-
- /* Compare weight */
- if(srv1->weight > srv2->weight){
- return 1;
- }
- else if(srv1->weight < srv2->weight){
- return -1;
- }
-
- return 0;
- }
- else{
- return -1;
- }
-}
-
-static const tsk_object_def_t tnet_dns_srv_def_s =
-{
- sizeof(tnet_dns_srv_t),
- tnet_dns_srv_ctor,
- tnet_dns_srv_dtor,
- tnet_dns_srv_cmp,
-};
-const tsk_object_def_t *tnet_dns_srv_def_t = &tnet_dns_srv_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_srv.h b/branches/1.0/tinyNET/src/dns/tnet_dns_srv.h
deleted file mode 100644
index 1e04c5d..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_srv.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_srv.h
- * @brief DNS SeRVice locator record - RR - (RFC 2782).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_SRV_H
-#define TNET_DNS_RR_SRV_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-/** DNS SRV Resource Record
-*/
-typedef struct tnet_dns_srv_s
-{
- TNET_DECLARE_DNS_RR;
-
- uint16_t priority;
- uint16_t weight;
- uint16_t port;
- char* target;
-}
-tnet_dns_srv_t;
-
-tnet_dns_srv_t* tnet_dns_srv_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_srv_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_SRV_H */
-
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_txt.c b/branches/1.0/tinyNET/src/dns/tnet_dns_txt.c
deleted file mode 100644
index baabed9..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_txt.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_txt.c
- * @brief DNS TeXT record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_dns_txt.h"
-
-#include "../tnet_types.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-/** Creates new DNS TXT Resource Record.
-*/
-
-tnet_dns_txt_t* tnet_dns_txt_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset)
-{
- return tsk_object_new(tnet_dns_txt_def_t, name, qclass, ttl, rdlength, data, offset);
-}
-
-//=================================================================================================
-// [[DNS TXT]] object definition
-//
-static tsk_object_t* tnet_dns_txt_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_dns_txt_t *txt = self;
- if(txt){
- const char* name = va_arg(*app, const char*);
- tnet_dns_qclass_t qclass = va_arg(*app, tnet_dns_qclass_t);
- uint32_t ttl = va_arg(*app, uint32_t);
-#if defined(__GNUC__)
- uint16_t rdlength = (uint16_t)va_arg(*app, unsigned);
-#else
- uint16_t rdlength = va_arg(*app, uint16_t);
-#endif
- const void* data = va_arg(*app, const void*);
- tsk_size_t offset = va_arg(*app, tsk_size_t);
-
- /* init base */
- tnet_dns_rr_init(TNET_DNS_RR(txt), qtype_txt, qclass);
- TNET_DNS_RR(txt)->name = tsk_strdup(name);
- TNET_DNS_RR(txt)->rdlength = rdlength;
- TNET_DNS_RR(txt)->ttl = ttl;
-
- if(rdlength){
- // ==> DESERIALIZATION
- /* TXT-DATA */
- tnet_dns_rr_charstring_deserialize(data, &(txt->txt_data), &offset);
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_dns_txt_dtor(tsk_object_t * self)
-{
- tnet_dns_txt_t *txt = self;
- if(txt){
- /* deinit base */
- tnet_dns_rr_deinit(TNET_DNS_RR(txt));
-
- TSK_FREE(txt->txt_data);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_dns_txt_def_s =
-{
- sizeof(tnet_dns_txt_t),
- tnet_dns_txt_ctor,
- tnet_dns_txt_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_dns_txt_def_t = &tnet_dns_txt_def_s;
diff --git a/branches/1.0/tinyNET/src/dns/tnet_dns_txt.h b/branches/1.0/tinyNET/src/dns/tnet_dns_txt.h
deleted file mode 100644
index 69b7a74..0000000
--- a/branches/1.0/tinyNET/src/dns/tnet_dns_txt.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_dns_txt.h
- * @brief DNS TeXT record - RR - (RFC 1035).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_DNS_RR_TXT_H
-#define TNET_DNS_RR_TXT_H
-
-#include "tinynet_config.h"
-
-#include "tnet_dns_rr.h"
-
-
-TNET_BEGIN_DECLS
-
-/** DNS TXT Resource Record
-*/
-typedef struct tnet_dns_txt_s
-{
- TNET_DECLARE_DNS_RR;
-
- /* RFC 1035 - 3.3.14. TXT RDATA format
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- / TXT-DATA /
- +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- */
- char* txt_data;
-}
-tnet_dns_txt_t;
-
-tnet_dns_txt_t* tnet_dns_txt_create(const char* name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void* data, tsk_size_t offset);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_dns_txt_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_DNS_RR_TXT_H */
-
diff --git a/branches/1.0/tinyNET/src/ice/tnet_ice.c b/branches/1.0/tinyNET/src/ice/tnet_ice.c
deleted file mode 100644
index 59916d3..0000000
--- a/branches/1.0/tinyNET/src/ice/tnet_ice.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_ice.c
- * @brief Interactive Connectivity Establishment (ICE) implementation as per 'draft-ietf-mmusic-ice-19' and 'draft-ietf-mmusic-ice-tcp-08'.
- * http://tools.ietf.org/html/draft-ietf-mmusic-ice-19
- * http://tools.ietf.org/html/draft-ietf-mmusic-ice-tcp-08
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_ice.h"
diff --git a/branches/1.0/tinyNET/src/ice/tnet_ice.h b/branches/1.0/tinyNET/src/ice/tnet_ice.h
deleted file mode 100644
index 0ac69ef..0000000
--- a/branches/1.0/tinyNET/src/ice/tnet_ice.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_ice.h
- * @brief Interactive Connectivity Establishment (ICE) implementation as per 'draft-ietf-mmusic-ice-19' and 'draft-ietf-mmusic-ice-tcp-08'.
- * http://tools.ietf.org/html/draft-ietf-mmusic-ice-19
- * http://tools.ietf.org/html/draft-ietf-mmusic-ice-tcp-08
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_ICE_H
-#define TNET_ICE_H
-
-#include "../tinynet_config.h"
-
-TNET_BEGIN_DECLS
-
-
-TNET_END_DECLS
-
-#endif /* TNET_ICE_H */
diff --git a/branches/1.0/tinyNET/src/stun/tnet_stun.c b/branches/1.0/tinyNET/src/stun/tnet_stun.c
deleted file mode 100644
index 5faa974..0000000
--- a/branches/1.0/tinyNET/src/stun/tnet_stun.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_stun.c
- * @brief Session Traversal Utilities for NAT (STUN) implementation as per RFC 5389 and RFC 3489(Obsolete).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_stun.h"
-
-#include "../tnet_nat.h"
-#include "../tnet_utils.h"
-
-#include "tsk_md5.h"
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_buffer.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-/**@defgroup tnet_stun_group STUN2 (RFC 5389) implementation.
-*/
-
-
-/**@ingroup tnet_stun_group
-* Creates new @ref tnet_stun_binding_t object.
-*/
-tnet_stun_binding_t* tnet_stun_binding_create(tnet_fd_t fd, tnet_socket_type_t socket_type, const char* server_address, tnet_port_t server_port, const char* username, const char* password)
-{
- return tsk_object_new(tnet_stun_binding_def_t, fd, socket_type, server_address, server_port, username, password);
-}
-
-/**@ingroup tnet_stun_group
- *
- * Create generic STUN2 request with all mandatory headers and attributes.
- *
- * @param [in,out] binding The binding object from which to create the request.
- *
- * @retval STUN2 request if succeed and NULL otherwise.
-**/
-tnet_stun_message_t *tnet_stun_create_request(const tnet_stun_binding_t* binding)
-{
- tnet_stun_message_t *message = tnet_stun_message_create(binding->username, binding->password);
- message->realm = tsk_strdup(binding->realm);
- message->nonce = tsk_strdup(binding->nonce);
-
- if(message){
- /* Set the request type (RFC 5389 defines only one type) */
- message->type = stun_binding_request;
-
- { /* Create random transaction id */
- tsk_istr_t random;
- tsk_md5digest_t digest;
-
- tsk_strrandom(&random);
- TSK_MD5_DIGEST_CALC(random, sizeof(random), digest);
-
- memcpy(message->transaction_id, digest, TNET_STUN_TRANSACID_SIZE);
- }
-
- /* Add software attribute */
- if(binding->software){
- tnet_stun_attribute_t* attribute = (tnet_stun_attribute_t*)tnet_stun_attribute_software_create(binding->software, tsk_strlen(binding->software));
- tnet_stun_message_add_attribute(message, &attribute);
- }
- }
-
- return message;
-}
-
-int tnet_stun_send_reliably(const tnet_stun_message_t* message)
-{
- return -1;
-}
-
-
-/**@ingroup tnet_stun_group
- *
- * Internal function to send a STUN message using unrealiable protocol such as UDP.
- *
- *
- * @param localFD The local file descriptor.
- * @param RTO The Retransmission TimeOut.
- * @param Rc The Number of retransmissions.
- * @param [in,out] message The message to send.
- * @param [in,out] server The destination STUN server.
- *
- * @return The response from the server or NULL if transport error.
-**/
-tnet_stun_response_t* tnet_stun_send_unreliably(tnet_fd_t localFD, uint16_t RTO, uint16_t Rc, const tnet_stun_message_t* message, struct sockaddr* server)
-{
- /* RFC 5389 - 7.2.1. Sending over UDP
- STUN indications are not retransmitted; thus, indication transactions over UDP
- are not reliable.
- */
- //int retransmit = (message->type == stun_binding_request);
-
- int ret = -1;
- uint16_t i, rto = RTO;
- struct timeval tv;
- fd_set set;
-
- tsk_buffer_t *buffer = tnet_stun_message_serialize(message);
- tnet_stun_response_t *response = 0;
-
- if(!buffer)
- {
- goto bail;
- }
-
- {
-//#ifndef SIO_UDP_CONNRESET
-//# ifndef IOC_VENDOR
-//# define IOC_VENDOR 0x18000000
-//# endif
-//# ifndef _WSAIOW
-//# define _WSAIOW(x,y) (IOC_IN|(x)|(y))
-//# endif
-//# define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
-//#endif
-// DWORD dwBytesReturned = 0;
-// BOOL bNewBehavior = TRUE;
-// DWORD status;
-//
-// // disable new behavior using
-// // IOCTL: SIO_UDP_CONNRESET
-// status = WSAIoctl(localFD, SIO_UDP_CONNRESET, &bNewBehavior, sizeof(bNewBehavior),
-// NULL, 0, &dwBytesReturned, NULL, NULL);
- }
-
- tv.tv_sec = 0;
- tv.tv_usec = 0;
-
- /* RFC 5389 - 7.2.1. Sending over UDP
- A client SHOULD retransmit a STUN request message starting with an
- interval of RTO ("Retransmission TimeOut"), doubling after each
- retransmission.
-
- e.g. 0 ms, 500 ms, 1500 ms, 3500 ms, 7500ms, 15500 ms, and 31500 ms
- */
- for(i=0; i<Rc; i++){
- tv.tv_sec += rto/1000;
- tv.tv_usec += (rto% 1000) * 1000;
-
- FD_ZERO(&set);
- FD_SET(localFD, &set);
-
- ret = tnet_sockfd_sendto(localFD, server, buffer->data, buffer->size);
-
- if((ret = select(localFD+1, &set, NULL, NULL, &tv))<0){
- goto bail;
- }
- else if(ret == 0){
- /* timeout */
- TSK_DEBUG_INFO("STUN request timedout at %d", i);
- rto *= 2;
- continue;
- }
- else if(FD_ISSET(localFD, &set)){
- /* there is data to read */
-
- tsk_size_t len = 0;
- void* data = 0;
-
- TSK_DEBUG_INFO("STUN request got response");
-
- /* Check how how many bytes are pending */
- if((ret = tnet_ioctlt(localFD, FIONREAD, &len))<0){
- goto bail;
- }
-
- if(len==0){
- TSK_DEBUG_INFO("tnet_ioctlt() returent zero bytes");
- continue;
- }
-
- /* Receive pending data */
- data = tsk_calloc(len, sizeof(uint8_t));
- if((ret = tnet_sockfd_recvfrom(localFD, data, len, 0, server))<0){
- TSK_FREE(data);
-
- TSK_DEBUG_ERROR("Recving STUN dgrams failed with error code:%d", tnet_geterrno());
- goto bail;
- }
-
- /* Parse the incoming response. */
- response = tnet_stun_message_deserialize(data, (tsk_size_t)ret);
- TSK_FREE(data);
-
- if(response){
- if(tnet_stun_transacid_cmp(message->transaction_id, response->transaction_id)){
- /* Not same transaction id */
- TSK_OBJECT_SAFE_FREE(response);
- continue;
- }
- }
-
- goto bail;
- }
- else{
- continue;
- }
- }
-
-bail:
- TSK_OBJECT_SAFE_FREE(buffer);
-
- return response;
-}
-
-/**@ingroup tnet_stun_group
- * Internal function to send a STUN2 binding request over the network.
- *
- * @param [in,out] context The NAT context holding the user preferences.
- * @param [in,out] binding The STUN binding object used to create the message to send.
- *
- * @return Zero if succeed and non-zero error code otherwise.
-**/
-int tnet_stun_send_bind(const tnet_nat_context_t* context, tnet_stun_binding_t *binding)
-{
- int ret = -1;
- tnet_stun_response_t *response = 0;
- tnet_stun_request_t *request = 0;
-
-
- goto stun_phase0;
-
- /* RFC 5389 - 10.2.1.1. First Request
- If the client has not completed a successful request/response
- transaction with the server (as identified by hostname, if the DNS
- procedures of Section 9 are used, else IP address if not), it SHOULD
- omit the USERNAME, MESSAGE-INTEGRITY, REALM, and NONCE attributes.
- In other words, the very first request is sent as if there were no
- authentication or message integrity applied.
- */
-stun_phase0:
- {
- if(!(request = tnet_stun_create_request(binding))){
- goto bail;
- }
-
- if(TNET_SOCKET_TYPE_IS_DGRAM(context->socket_type)){
- response = tnet_stun_send_unreliably(binding->localFD, context->RTO, context->Rc, request, (struct sockaddr*)&binding->server);
- }
-
- if(response){
- if(TNET_STUN_RESPONSE_IS_ERROR(response)){
- short code = tnet_stun_message_get_errorcode(response);
- const char* realm = tnet_stun_message_get_realm(response);
- const char* nonce = tnet_stun_message_get_nonce(response);
-
- if(code == 401 && realm && nonce){
- if(!binding->nonce){
- /* First time we get a nonce */
- tsk_strupdate(&binding->nonce, nonce);
- tsk_strupdate(&binding->realm, realm);
-
- /* Delete the message and response before retrying*/
- TSK_OBJECT_SAFE_FREE(response);
- TSK_OBJECT_SAFE_FREE(request);
-
- // Send again using new transaction identifier
- return tnet_stun_send_bind(context, binding);
- }
- else{
- ret = -3;
- }
- }
- else{
- ret = -2;
- }
- }
- else{
- const tnet_stun_attribute_t *attribute;
- if((attribute= tnet_stun_message_get_attribute(response, stun_xor_mapped_address))){
- ret = 0;
- binding->xmaddr = tsk_object_ref((void*)attribute);
- }
- else if((attribute= tnet_stun_message_get_attribute(response, stun_mapped_address))){
- ret = 0;
- binding->maddr = tsk_object_ref((void*)attribute);
- }
- }
- }
- }
- /* END OF stun_phase0 */
-
-bail:
- TSK_OBJECT_SAFE_FREE(response);
- TSK_OBJECT_SAFE_FREE(request);
-
- return ret;
-}
-
-/**@ingroup tnet_stun_group
- *
- * Public function to create a binding context.
- *
- * @param [in,out] nat_context The NAT context.
- * @param localFD The local file descriptor for which to create the binding context.
- *
- * @return A valid binding id if succeed and @ref TNET_STUN_INVALID_BINDING_ID otherwise. If the returned id is valid then
- * the newly created binding will contain the server reflexive address associated to the local file descriptor.
-**/
-tnet_stun_binding_id_t tnet_stun_bind(const tnet_nat_context_t* nat_context, tnet_fd_t localFD)
-{
- tnet_stun_binding_id_t id = TNET_STUN_INVALID_BINDING_ID;
-
- tnet_stun_binding_t *binding = 0;
-
- if(nat_context && localFD != TNET_INVALID_FD){
- if(!(binding = tnet_stun_binding_create(localFD, nat_context->socket_type, nat_context->server_address, nat_context->server_port, nat_context->username, nat_context->password))){
- goto bail;
- }
-
- if(tnet_stun_send_bind(nat_context, binding)){
- TSK_OBJECT_SAFE_FREE(binding);
- goto bail;
- }
-
- id = binding->id;
- tsk_list_push_back_data(nat_context->stun_bindings, (void**)&binding);
- }
-
-bail:
- return id;
-}
-
-/**@ingroup tnet_stun_group
- * Compares two transaction ids.
- *
- * @param id1 The first transaction identifier.
- * @param id2 The second transaction identifier.
- *
- * @return Zero if the two identifiers are equal and non-zero value otherwise.
-**/
-int tnet_stun_transacid_cmp(const tnet_stun_transacid_t id1, const tnet_stun_transacid_t id2)
-{
- tsk_size_t i;
- for(i=0; i<sizeof(tnet_stun_transacid_t); i++){
- if(id1[i] != id2[i]){
- return (id1[i] - id2[i]);
- }
- }
- return 0;
-}
-
-
-
-
-
-
-
-
-
-
-//=================================================================================================
-// STUN2 BINDING object definition
-//
-static tsk_object_t* tnet_stun_binding_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_binding_t *binding = self;
- if(binding){
- static tnet_stun_binding_id_t __binding_unique_id = 0;
-
- const char* server_address;
- tnet_port_t server_port;
-
- binding->id = ++__binding_unique_id;
-
- binding->localFD = va_arg(*app, tnet_fd_t);
- binding->socket_type = va_arg(*app, tnet_socket_type_t);
-
- server_address = tsk_strdup(va_arg(*app, const char*));
-#if defined(__GNUC__)
- server_port = (tnet_port_t)va_arg(*app, unsigned);
-#else
- server_port = va_arg(*app, tnet_port_t);
-#endif
-
- binding->username = tsk_strdup(va_arg(*app, const char*));
- binding->password = tsk_strdup(va_arg(*app, const char*));
-
- tnet_sockaddr_init(server_address, server_port, binding->socket_type, &binding->server);
-
- binding->software = tsk_strdup(TNET_SOFTWARE);
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_binding_dtor(tsk_object_t * self)
-{
- tnet_stun_binding_t *binding = self;
- if(binding){
- TSK_FREE(binding->username);
- TSK_FREE(binding->password);
- TSK_FREE(binding->realm);
- TSK_FREE(binding->nonce);
-
- TSK_FREE(binding->software);
-
- TSK_OBJECT_SAFE_FREE(binding->maddr);
- TSK_OBJECT_SAFE_FREE(binding->xmaddr);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_binding_def_s =
-{
- sizeof(tnet_stun_binding_t),
- tnet_stun_binding_ctor,
- tnet_stun_binding_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_binding_def_t = &tnet_stun_binding_def_s;
-
-
diff --git a/branches/1.0/tinyNET/src/stun/tnet_stun.h b/branches/1.0/tinyNET/src/stun/tnet_stun.h
deleted file mode 100644
index 05933ca..0000000
--- a/branches/1.0/tinyNET/src/stun/tnet_stun.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_stun.h
- * @brief Session Traversal Utilities for NAT (STUN) implementation as per RFC 5389 and RFC 3489(Obsolete).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_STUN_H
-#define TNET_STUN_H
-
-#include "tinynet_config.h"
-#include "stun/tnet_stun_message.h"
-#include "tnet_types.h"
-#include "tnet_socket.h"
-
-#include "tsk_object.h"
-
-TNET_BEGIN_DECLS
-
-/**@ingroup tnet_stun_group
-*/
-typedef uint64_t tnet_stun_binding_id_t;
-/**@ingroup tnet_stun_group
- * @def TNET_STUN_INVALID_BINDING_ID
- * STUN2 invalid binding id.
-**/
-/**@ingroup tnet_stun_group
- * @def TNET_STUN_IS_VALID_BINDING_ID
- * Checks the validity of the STUN @a id.
-**/
-#define TNET_STUN_INVALID_BINDING_ID 0
-#define TNET_STUN_IS_VALID_BINDING_ID(id) (id != TNET_STUN_INVALID_BINDING_ID)
-
-/**@ingroup tnet_stun_group
- * Default port for both TCP and UDP protos as per RFC 5389 subclause 9.
-**/
-#define TNET_STUN_TCP_UDP_DEFAULT_PORT 3478
-
-/**@ingroup tnet_stun_group
- * Default port for TLS protocol as per RFC 5389 subclause 9.
-**/
-#define TNET_STUN_TLS_DEFAULT_PORT 5349
-
-
-/**@ingroup tnet_stun_group
- * STUN2 magic cookie value in network byte order as per RFC 5389 subclause 6.
-**/
-#define TNET_STUN_MAGIC_COOKIE 0x2112A442
-
-/**@ingroup tnet_stun_group
- * STUN2 header size as per RFC 5389 subclause 6.
-**/
-#define TNET_STUN_HEADER_SIZE 20
-
-/**@ingroup tnet_stun_group
- * STUN2 binding context.
-**/
-typedef struct tnet_stun_binding_s
-{
- TSK_DECLARE_OBJECT;
-
- //! A unique id to identify this binding.
- tnet_stun_binding_id_t id;
-
- //! The username to authenticate to the STUN server.
- char* username;
- //! The password to authenticate to the STUN server.
- char* password;
- //! The realm.
- char* realm;
- //! The nonce.
- char* nonce;
- //! The client name.
- char* software;
- //! Local file descriptor for which to get server reflexive address.
- tnet_fd_t localFD;
- //! The type of the bound socket.
- tnet_socket_type_t socket_type;
- //! The address of the STUN server.
- struct sockaddr_storage server;
- //! Server reflexive address of the local socket(STUN1 as per RFC 3489).
- tnet_stun_attribute_mapped_addr_t *maddr;
- //! XORed server reflexive address (STUN2 as per RFC 5389).
- tnet_stun_attribute_xmapped_addr_t *xmaddr;
-}tnet_stun_binding_t;
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_binding_def_t;
-/**@ingroup tnet_stun_group
- * List of @ref tnet_stun_binding_t elements.
-**/
-typedef tsk_list_t tnet_stun_bindings_L_t;
-
-//#if defined(__SYMBIAN32__) || ANDROID /* Forward declaration */
-struct tnet_nat_context_s;
-//#endif
-
-int tnet_stun_send_reliably(const tnet_stun_message_t* message);
-tnet_stun_response_t* tnet_stun_send_unreliably(tnet_fd_t localFD, uint16_t RTO, uint16_t Rc, const tnet_stun_message_t* message, struct sockaddr* server);
-TINYNET_API tnet_stun_binding_id_t tnet_stun_bind(const struct tnet_nat_context_s* nat_context, tnet_fd_t localFD);
-int tnet_stun_transacid_cmp(const tnet_stun_transacid_t id1, const tnet_stun_transacid_t id2);
-
-TNET_END_DECLS
-
-
-#endif /* TNET_STUN_H */
-
diff --git a/branches/1.0/tinyNET/src/stun/tnet_stun_attribute.c b/branches/1.0/tinyNET/src/stun/tnet_stun_attribute.c
deleted file mode 100644
index feb6909..0000000
--- a/branches/1.0/tinyNET/src/stun/tnet_stun_attribute.c
+++ /dev/null
@@ -1,960 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_stun_attribute.c
- * @brief STUN2(RFC 5389) attribute parser.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_stun_attribute.h"
-
-#include "tnet_stun.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "../turn/tnet_turn_attribute.h"
-
-#include "tsk_memory.h"
-#include "tsk_string.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15. STUN Attributes
-* Creates new @ref tnet_stun_attribute_def_t object.
-*/
-tnet_stun_attribute_t* tnet_stun_attribute_create()
-{
- return tsk_object_new(tnet_stun_attribute_def_t);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.1. MAPPED-ADDRESS.
-* Creates new @ref tnet_stun_attribute_mapped_addr_t object.
-*/
-tnet_stun_attribute_mapped_addr_t* tnet_stun_attribute_mapped_address_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_mapped_addr_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.2. XOR-MAPPED-ADDRESS.
-* Creates new @ref tnet_stun_attribute_xmapped_addr_t object.
-*/
-tnet_stun_attribute_xmapped_addr_t* tnet_stun_attribute_xmapped_address_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_xmapped_addr_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.3. USERNAME.
-* Creates new @ref tnet_stun_attribute_username_t object.
-*/
-tnet_stun_attribute_username_t* tnet_stun_attribute_username_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_username_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.4. MESSAGE-INTEGRITY.
-* Creates new @ref tnet_stun_attribute_integrity_t object.
-*/
-tnet_stun_attribute_integrity_t* tnet_stun_attribute_integrity_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_integrity_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.5. FINGERPRINT.
-* Creates new @ref tnet_stun_attribute_fingerprint_t object.
-*/
-tnet_stun_attribute_fingerprint_t* tnet_stun_attribute_fingerprint_create(uint32_t fingerprint)
-{
- return tsk_object_new(tnet_stun_attribute_fingerprint_def_t, fingerprint);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.6. ERROR-CODE
-* Creates new @ref tnet_stun_attribute_errorcode_t object.
-*/
-tnet_stun_attribute_errorcode_t* tnet_stun_attribute_errorcode_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_errorcode_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.7. REALM.
-* Creates new @ref tnet_stun_attribute_realm_t object.
-*/
-tnet_stun_attribute_realm_t* tnet_stun_attribute_realm_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_realm_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.8. NONCE.
-* Creates new @ref tnet_stun_attribute_nonce_t object.
-*/
-tnet_stun_attribute_nonce_t* tnet_stun_attribute_nonce_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_nonce_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.9. UNKNOWN-ATTRIBUTES.
-* Creates new @ref tnet_stun_attribute_unknowns_t object.
-*/
-tnet_stun_attribute_unknowns_t* tnet_stun_attribute_unknowns_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_unknowns_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.10. SOFTWARE.
-* Creates new @ref tnet_stun_attribute_software_t object.
-*/
-tnet_stun_attribute_software_t* tnet_stun_attribute_software_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_software_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.11. ALTERNATE-SERVER.
-* Creates new @ref tnet_stun_attribute_altserver_t object.
-*/
-tnet_stun_attribute_altserver_t* tnet_stun_attribute_altserver_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_stun_attribute_altserver_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_stun_group
-* Creates @ref tnet_stun_attribute_t from raw buffer.
-* @param data Raw buffer from which to create the STUN attribute.*
-* @param size The size of the eaw buffer.
-* @retval @ref tnet_stun_attribute_t object if succeed and NULL other wise.
-*/
-tnet_stun_attribute_t* tnet_stun_attribute_deserialize(const void* data, tsk_size_t size)
-{
- tnet_stun_attribute_t *attribute = 0;
- const uint8_t* dataPtr = data;
-
- tnet_stun_attribute_type_t type = (tnet_stun_attribute_type_t)tnet_ntohs_2(dataPtr);
- uint16_t length = tnet_ntohs_2(&dataPtr[2]);
-
- /* Check validity */
- if(!data || size<=4/* Type(2-bytes) plus Length (2-bytes) */)
- {
- return 0;
- }
-
- dataPtr += (2 /* Type */+ 2/* Length */);
-
- /* Attribute Value
- */
-
- switch(type)
- {
- /* RFC 5389 - 15.1. MAPPED-ADDRESS */
- case stun_mapped_address:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_mapped_address_create(dataPtr, length);
- break;
- }
-
- /* RFC 5389 - 15.2. XOR-MAPPED-ADDRESS*/
- case stun_xor_mapped_address:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_xmapped_address_create(dataPtr, length);
- break;
- }
-
- /* RFC 5389 - 15.3. USERNAME*/
- case stun_username:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_username_create(dataPtr, length);
- break;
- }
-
-
- /* RFC 5389 - MESSAGE-INTEGRITY*/
- case stun_message_integrity:
- {
- if(length == TSK_SHA1_DIGEST_SIZE){
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_integrity_create(dataPtr, length);
- }
- break;
- }
-
- /* RFC 5389 - 15.5. FINGERPRINT*/
- case stun_fingerprint:
- {
- uint32_t fingerprint = tnet_htonl_2(dataPtr);
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_fingerprint_create(fingerprint);
- break;
- }
-
- /* RFC 5389 - 15.6. ERROR-CODE*/
- case stun_error_code:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_errorcode_create(dataPtr, length);
- break;
- }
-
- /* RFC 5389 - 15.7. REALM*/
- case stun_realm:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_realm_create(dataPtr, length);
- break;
- }
-
- /* RFC 5389 - 15.8. NONCE*/
- case stun_nonce:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_nonce_create(dataPtr, length);
- break;
- }
-
- /* RFC 5389 - 15.9. UNKNOWN-ATTRIBUTES*/
- case stun_unknown_attributes:
- {
- TSK_DEBUG_ERROR("DESERIALIZE:UNKNOWN-ATTRIBUTES ==> NOT IMPLEMENTED");
- attribute = tnet_stun_attribute_create();
- break;
- }
-
- /* RFC 5389 - 15.10. SOFTWARE */
- case stun_software:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_software_create(dataPtr, length);
- break;
- }
-
- /* RFC 5389 - 15.11. ALTERNATE-SERVER */
- case stun_alternate_server:
- {
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_altserver_create(dataPtr, length);
- break;
- }
-
- /* draft-ietf-behave-turn-16 subclause 14 */
- case stun_channel_number:
- case stun_lifetime:
- case stun_reserved2:
- case stun_xor_peer_address:
- case stun_data:
- case stun_xor_relayed_address:
- case stun_even_port:
- case stun_requested_transport:
- case stun_dont_fragment:
- case stun_reserved3:
- case stun_reservation_token:
- {
- attribute = tnet_turn_attribute_deserialize(type, length, dataPtr, length);
- break;
- }
-
- default:
- //TSK_DEBUG_WARN("==> NOT IMPLEMENTED");
- break;
- }
-
- if(!attribute){
- /* Create default */
- attribute = tnet_stun_attribute_create();
- }
-
- /* Set common values (Do I need this ==> already set by the constructor). */
- attribute->type = type;
- attribute->length = length;
-
- return attribute;
-}
-
-/**@ingroup tnet_stun_group
-* Serializes a @ref tnet_stun_attribute_t objet in binary format.
-* @param attribute The STUN attribute to serialize.
-* @param output The output binary buffer.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_stun_attribute_serialize(const tnet_stun_attribute_t* attribute, tsk_buffer_t *output)
-{
- if(!attribute || !output){
- return -1;
- }
-
- /* Attribute Type
- */
- {
- uint16_t type = tnet_htons(attribute->type);
- tsk_buffer_append(output, &(type), 2);
- }
-
- /* Attribute Length
- */
- {
- uint16_t length = tnet_htons(attribute->length);
- tsk_buffer_append(output, &(length), 2);
- }
-
- /* Attribute Value
- */
-
- switch(attribute->type){
- /* RFC 5389 - 15.1. MAPPED-ADDRESS */
- case stun_mapped_address:
- {
- TSK_DEBUG_ERROR("NOT IMPLEMENTED");
- return -3;
- }
-
- /* RFC 5389 - 15.2. XOR-MAPPED-ADDRESS*/
- case stun_xor_mapped_address:
- {
- TSK_DEBUG_ERROR("NOT IMPLEMENTED");
- return -3;
- }
-
- /* RFC 5389 - 15.3. USERNAME*/
- case stun_username:
- {
- tnet_stun_attribute_username_t *username = (tnet_stun_attribute_username_t*)attribute;
- tsk_buffer_append(output, username->value, tsk_strlen(username->value));
- return 0;
- }
-
-
- /* RFC 5389 - MESSAGE-INTEGRITY*/
- case stun_message_integrity:
- {
- tnet_stun_attribute_integrity_t *integrity = (tnet_stun_attribute_integrity_t*)attribute;
- tsk_buffer_append(output, integrity->sha1digest, TSK_SHA1_DIGEST_SIZE);
- return 0;
- }
-
- /* RFC 5389 - 15.5. FINGERPRINT*/
- case stun_fingerprint:
- {
- uint32_t fingerprint = /*tnet_htonl*/(((tnet_stun_attribute_fingerprint_t*)attribute)->value);
- tsk_buffer_append(output, &fingerprint, 4);
- return 0;
- }
-
- /* RFC 5389 - 15.6. ERROR-CODE*/
- case stun_error_code:
- {
- TSK_DEBUG_ERROR("NOT IMPLEMENTED");
- return -3;
- }
-
- /* RFC 5389 - 15.7. REALM*/
- case stun_realm:
- {
- tnet_stun_attribute_realm_t *realm = (tnet_stun_attribute_realm_t*)attribute;
- tsk_buffer_append(output, realm->value, tsk_strlen(realm->value));
- return 0;
- }
-
- /* RFC 5389 - 15.8. NONCE*/
- case stun_nonce:
- {
- tnet_stun_attribute_nonce_t *nonce = (tnet_stun_attribute_nonce_t*)attribute;
- tsk_buffer_append(output, nonce->value, tsk_strlen(nonce->value));
- return 0;
- }
-
- /* RFC 5389 - 15.9. UNKNOWN-ATTRIBUTES*/
- case stun_unknown_attributes:
- {
- TSK_DEBUG_ERROR("NOT IMPLEMENTED");
- return -3;
- }
-
- /* RFC 5389 - 15.10. SOFTWARE */
- case stun_software:
- {
- tnet_stun_attribute_software_t *software = (tnet_stun_attribute_software_t*)attribute;
- tsk_buffer_append(output, software->value, tsk_strlen(software->value));
- return 0;
- }
-
- /* RFC 5389 - 15.11. ALTERNATE-SERVER */
- case stun_alternate_server:
- {
- TSK_DEBUG_ERROR("NOT IMPLEMENTED");
- return -3;
- }
- /* draft-ietf-behave-turn-16 - */
- case stun_channel_number:
- case stun_lifetime:
- case stun_reserved2:
- case stun_xor_peer_address:
- case stun_data:
- case stun_xor_relayed_address:
- case stun_even_port:
- case stun_requested_transport:
- case stun_dont_fragment:
- case stun_reserved3:
- case stun_reservation_token:
- {
- return tnet_turn_attribute_serialize(attribute, output);
- }
-
- default:
- return -2;
- }
-}
-
-/**@ingroup tnet_stun_group
-* Pads a STUN attribute to align it on 4 octets.
-* @param attribute The STUN attribute to pad.
-* @param output The output buffer into which to put zeros.
-*/
-void tnet_stun_attribute_pad(const tnet_stun_attribute_t* attribute, tsk_buffer_t *output)
-{
- if(attribute->length%4){
- static uint32_t zeros = 0x00000000;
- tsk_buffer_append(output, &zeros, 4-(attribute->length%4));
- }
-}
-
-
-
-
-//=================================================================================================
-// [[RFC 5389 - 15. STUN Attributes]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_def_s =
-{
- sizeof(tnet_stun_attribute_t),
- tnet_stun_attribute_ctor,
- tnet_stun_attribute_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_def_t = &tnet_stun_attribute_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.1. MAPPED-ADDRESS]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_mapped_addr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_mapped_addr_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- const uint8_t *payloadPtr = (const uint8_t*)payload;
- payloadPtr += 1; /* Ignore first 8bits */
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_mapped_address;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
-
- attribute->family = (tnet_stun_addr_family_t) (*(payloadPtr++));
- attribute->port = tnet_ntohs_2(payloadPtr);
- payloadPtr+=2;
-
- { /*=== Compute IP address */
- tsk_size_t addr_size = (attribute->family == stun_ipv6) ? 16 : (attribute->family == stun_ipv4 ? 4 : 0);
- if(addr_size){
- tsk_size_t i;
-
- for(i=0; i<addr_size; i+=4){
- // ntohl() not needed : byte per byte to avoid endianness problem
- attribute->address[i] = payloadPtr[0],
- attribute->address[i+1] = payloadPtr[1],
- attribute->address[i+2] = payloadPtr[2],
- attribute->address[i+3] = payloadPtr[3];
- payloadPtr+=4;
- }
- }
- else{
- TSK_DEBUG_ERROR("UNKNOWN FAMILY [%u].", attribute->family);
- }
- }
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_mapped_addr_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_mapped_addr_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_mapped_addr_def_s =
-{
- sizeof(tnet_stun_attribute_mapped_addr_t),
- tnet_stun_attribute_mapped_addr_ctor,
- tnet_stun_attribute_mapped_addr_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_mapped_addr_def_t = &tnet_stun_attribute_mapped_addr_def_s;
-
-//=================================================================================================
-// [[RFC 5389 - 15.2. XOR-MAPPED-ADDRESS]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_xmapped_addr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_xmapped_addr_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- const uint8_t *payloadPtr = (const uint8_t*)payload;
- payloadPtr += 1; /* Ignore first 8bits */
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_xor_mapped_address;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
-
- attribute->family = (tnet_stun_addr_family_t)(*(payloadPtr++));
-
- /* RFC 5389 - 15.2. XOR-MAPPED-ADDRESS
- X-Port is computed by taking the mapped port in host byte order,
- XOR'ing it with the most significant 16 bits of the magic cookie, and
- then the converting the result to network byte order.
- */
- attribute->xport = tnet_ntohs_2(payloadPtr);
- attribute->xport ^= 0x2112;
- payloadPtr+=2;
-
-
- { /*=== Compute IP address */
-
- /* RFC 5389 - 15.2. XOR-MAPPED-ADDRESS
- If the IP address family is IPv4, X-Address is computed by taking the mapped IP
- address in host byte order, XOR'ing it with the magic cookie, and
- converting the result to network byte order.
- */
- tsk_size_t addr_size = (attribute->family == stun_ipv6) ? 16 : (attribute->family == stun_ipv4 ? 4 : 0);
- if(addr_size){
- tsk_size_t i;
- uint32_t addr;
-
- for(i=0; i<addr_size; i+=4){
- addr = tnet_ntohl(tnet_ntohl_2(payloadPtr) ^ TNET_STUN_MAGIC_COOKIE);
- memcpy(&attribute->xaddress[i], &addr, 4);
- payloadPtr+=4;
- }
- }
- else{
- TSK_DEBUG_ERROR("UNKNOWN FAMILY [%u].", attribute->family);
- }
- }
- }
-
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_xmapped_addr_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_xmapped_addr_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_xmapped_addr_def_s =
-{
- sizeof(tnet_stun_attribute_xmapped_addr_t),
- tnet_stun_attribute_xmapped_addr_ctor,
- tnet_stun_attribute_xmapped_addr_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_xmapped_addr_def_t = &tnet_stun_attribute_xmapped_addr_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.3. USERNAME]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_username_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_username_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- attribute->value = tsk_strndup(payload, payload_size);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_username;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_username_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_username_t *attribute = self;
- if(attribute){
- TSK_FREE(attribute->value);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_username_def_s =
-{
- sizeof(tnet_stun_attribute_username_t),
- tnet_stun_attribute_username_ctor,
- tnet_stun_attribute_username_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_username_def_t = &tnet_stun_attribute_username_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.4. MESSAGE-INTEGRITY]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_integrity_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_integrity_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload_size == TSK_SHA1_DIGEST_SIZE){
- memcpy(attribute->sha1digest, payload, TSK_SHA1_DIGEST_SIZE);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_message_integrity;
- TNET_STUN_ATTRIBUTE(attribute)->length = TSK_SHA1_DIGEST_SIZE;
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_integrity_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_integrity_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_integrity_def_s =
-{
- sizeof(tnet_stun_attribute_integrity_t),
- tnet_stun_attribute_integrity_ctor,
- tnet_stun_attribute_integrity_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_integrity_def_t = &tnet_stun_attribute_integrity_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.5. FINGERPRINT]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_fingerprint_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_fingerprint_t *attribute = self;
- if(attribute){
- attribute->value = va_arg(*app, uint32_t);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_fingerprint;
- TNET_STUN_ATTRIBUTE(attribute)->length = 4;
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_fingerprint_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_fingerprint_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_fingerprint_def_s =
-{
- sizeof(tnet_stun_attribute_fingerprint_t),
- tnet_stun_attribute_fingerprint_ctor,
- tnet_stun_attribute_fingerprint_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_fingerprint_def_t = &tnet_stun_attribute_fingerprint_def_s;
-
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.6. ERROR-CODE]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_errorcode_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_errorcode_t *attribute = self;
- if(attribute){
- const uint8_t *payload = (const uint8_t*)va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload_size >4){
- uint32_t code = tnet_htonl_2(payload);
- payload += 4;
-
- attribute->_class = code >>8;
- attribute->number = (code & 0xFF);
- attribute->reason_phrase = tsk_strndup((const char*)payload, (payload_size-4));
- }
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_error_code;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_errorcode_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_errorcode_t *attribute = self;
- if(attribute){
- TSK_FREE(attribute->reason_phrase);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_errorcode_def_s =
-{
- sizeof(tnet_stun_attribute_errorcode_t),
- tnet_stun_attribute_errorcode_ctor,
- tnet_stun_attribute_errorcode_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_errorcode_def_t = &tnet_stun_attribute_errorcode_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.7. REALM]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_realm_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_realm_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- attribute->value = tsk_strndup(payload, payload_size);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_realm;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_realm_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_realm_t *attribute = self;
- if(attribute){
- TSK_FREE(attribute->value);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_realm_def_s =
-{
- sizeof(tnet_stun_attribute_realm_t),
- tnet_stun_attribute_realm_ctor,
- tnet_stun_attribute_realm_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_realm_def_t = &tnet_stun_attribute_realm_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.8. NONCE]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_nonce_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_nonce_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- attribute->value = tsk_strndup(payload, payload_size);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_nonce;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_nonce_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_nonce_t *attribute = self;
- if(attribute){
- TSK_FREE(attribute->value);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_nonce_def_s =
-{
- sizeof(tnet_stun_attribute_nonce_t),
- tnet_stun_attribute_nonce_ctor,
- tnet_stun_attribute_nonce_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_nonce_def_t = &tnet_stun_attribute_nonce_def_s;
-
-
-//=================================================================================================
-// [[RFC 5389 - 15.9. UNKNOWN-ATTRIBUTES]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_unknowns_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_unknowns_t *attribute = self;
- if(attribute){
- //--const void *payload = va_arg(*app, const void*);
- //--tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_unknown_attributes;
- attribute->value = tsk_buffer_create_null();
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_unknowns_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_unknowns_t *attribute = self;
- if(attribute){
- TSK_OBJECT_SAFE_FREE(attribute->value);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_unknowns_def_s =
-{
- sizeof(tnet_stun_attribute_unknowns_t),
- tnet_stun_attribute_unknowns_ctor,
- tnet_stun_attribute_unknowns_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_unknowns_def_t = &tnet_stun_attribute_unknowns_def_s;
-
-//=================================================================================================
-// [[RFC 5389 - 15.10. SOFTWARE]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_software_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_software_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_software;
-
- attribute->value = tsk_strndup(payload, payload_size);
- TNET_STUN_ATTRIBUTE(attribute)->length = tsk_strlen(attribute->value);
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_software_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_software_t *attribute = self;
- if(attribute){
- TSK_FREE(attribute->value);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_software_def_s =
-{
- sizeof(tnet_stun_attribute_software_t),
- tnet_stun_attribute_software_ctor,
- tnet_stun_attribute_software_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_software_def_t = &tnet_stun_attribute_software_def_s;
-
-//=================================================================================================
-// [[RFC 5389 - 15.11. ALTERNATE-SERVER]] object definition
-//
-static tsk_object_t* tnet_stun_attribute_altserver_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_attribute_altserver_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- const uint8_t *payloadPtr = (const uint8_t*)payload;
- payloadPtr += 1; /* Ignore first 8bits */
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_alternate_server;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
-
- attribute->family = (tnet_stun_addr_family_t) (*(payloadPtr++));
- attribute->port = tnet_ntohs_2(payloadPtr);
- payloadPtr+=2;
-
- if(attribute->family == stun_ipv4){
- uint32_t addr = tnet_htonl_2(payloadPtr);
- memcpy(attribute->server, &addr, 4);
- payloadPtr+=4;
- }
- else if(attribute->family == stun_ipv6){
- TSK_DEBUG_ERROR("IPv6 not supported yet.");
- }
- else{
- TSK_DEBUG_ERROR("UNKNOWN FAMILY.");
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_attribute_altserver_dtor(tsk_object_t * self)
-{
- tnet_stun_attribute_altserver_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_attribute_altserver_def_s =
-{
- sizeof(tnet_stun_attribute_altserver_t),
- tnet_stun_attribute_altserver_ctor,
- tnet_stun_attribute_altserver_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_attribute_altserver_def_t = &tnet_stun_attribute_altserver_def_s;
-
diff --git a/branches/1.0/tinyNET/src/stun/tnet_stun_attribute.h b/branches/1.0/tinyNET/src/stun/tnet_stun_attribute.h
deleted file mode 100644
index 66fd7ff..0000000
--- a/branches/1.0/tinyNET/src/stun/tnet_stun_attribute.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_stun_attribute.h
- * @brief STUN2(RFC 5389) attribute parser.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_STUN_ATTRIBUTE_H
-#define TNET_STUN_ATTRIBUTE_H
-
-#include "tinynet_config.h"
-
-#include "tnet_types.h"
-
-#include "tsk_object.h"
-#include "tsk_buffer.h"
-#include "tsk_sha1.h"
-
-/**@ingroup tnet_stun_group
-* @def TNET_STUN_ATTRIBUTE
-* Converts (cast) any STUN attribute to @ref tnet_stun_attribute_t pointer.
-* @param self The attribute to convert (cast).
-* @retval A pointer to @ref tnet_stun_attribute_t object.
-*/
-TNET_BEGIN_DECLS
-
-#define TNET_STUN_ATTRIBUTE(self) ((tnet_stun_attribute_t*)(self))
-
-/**@ingroup tnet_stun_group
- * STUN IP family as per RFC 5389 subclause 15.1.
-**/
-typedef enum tnet_stun_addr_family_e
-{
- stun_ipv4 = 0x01,
- stun_ipv6 = 0x02
-}
-tnet_stun_addr_family_t;
-
-/**@ingroup tnet_stun_group
- * STUN attribute types as per RFC 5389 subclause 18.2.
-**/
-typedef enum tnet_stun_attribute_type_e
-{
- /* === RFC 5389 - Comprehension-required range (0x0000-0x7FFF):
- */
- stun_reserved = 0x0000, /**< (Reserved) */
- stun_mapped_address = 0x0001, /**< http://tools.ietf.org/html/rfc5389#page-32 */
- stun_response_address = 0x0002, /**< (Reserved; was RESPONSE-ADDRESS) */
- stun_change_address = 0x0003, /**< (Reserved; was CHANGE-ADDRESS) */
- stun_source_address = 0x0004, /**< (Reserved; was SOURCE-ADDRESS) */
- stun_changed_address = 0x0005, /**< (Reserved; was CHANGED-ADDRESS) */
- stun_username = 0x0006, /**< http://tools.ietf.org/html/rfc5389#page-34 */
- stun_password = 0x0007, /**< (Reserved; was PASSWORD) */
- stun_message_integrity = 0x0008, /**< http://tools.ietf.org/html/rfc5389#page-34 */
- stun_error_code = 0x0009, /**< http://tools.ietf.org/html/rfc5389#page-36 */
- stun_unknown_attributes = 0x000A, /**< http://tools.ietf.org/html/rfc5389#page-38 */
- stun_reflected_from = 0x000B, /**< (Reserved; was REFLECTED-FROM) */
- stun_realm = 0x0014, /**< http://tools.ietf.org/html/rfc5389#page-38 */
- stun_nonce = 0x0015, /**< http://tools.ietf.org/html/rfc5389#page-38 */
- stun_xor_mapped_address = 0x0020, /**< http://tools.ietf.org/html/rfc5389#page-33 */
-
- /* === RFC 5389 - Comprehension-optional range (0x8000-0xFFFF)
- */
- stun_software = 0x8022, /**< http://tools.ietf.org/html/rfc5389#page-39 */
- stun_alternate_server = 0x8023, /**< http://tools.ietf.org/html/rfc5389#page-39 */
- stun_fingerprint = 0x8028, /**< http://tools.ietf.org/html/rfc5389#page-36 */
-
- /* === draft-ietf-behave-turn-16
- */
- stun_channel_number = 0x000C, /**< draft-ietf-behave-turn-16 - CHANNEL-NUMBER */
- stun_lifetime = 0x000D, /**< draft-ietf-behave-turn-16 - LIFETIME */
- stun_reserved2 = 0x0010, /**< draft-ietf-behave-turn-16 - Reserved (was BANDWIDTH) */
- stun_xor_peer_address = 0x0012, /**< draft-ietf-behave-turn-16 - XOR-PEER-ADDRESS */
- stun_data = 0x0013, /**< draft-ietf-behave-turn-16 - DATA */
- stun_xor_relayed_address = 0x0016, /**< draft-ietf-behave-turn-16 - XOR-RELAYED-ADDRESS */
- stun_even_port = 0x0018, /**< draft-ietf-behave-turn-16 - EVEN-PORT */
- stun_requested_transport = 0x0019, /**< draft-ietf-behave-turn-16 - REQUESTED-TRANSPORT */
- stun_dont_fragment = 0x001A, /**< draft-ietf-behave-turn-16 - DONT-FRAGMENT */
- stun_reserved3 = 0x0021, /**< draft-ietf-behave-turn-16 - Reserved (was TIMER-VAL) */
- stun_reservation_token = 0x0022, /**< draft-ietf-behave-turn-16 - RESERVATION-TOKEN */
-}
-tnet_stun_attribute_type_t;
-
-
-/**@ingroup tnet_stun_group
- RFC 5389 - 15. STUN Attributes
-*/
-typedef struct tnet_stun_attribute_s
-{
- TSK_DECLARE_OBJECT;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Type | Length |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Value (variable) ....
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- tnet_stun_attribute_type_t type;
- uint16_t length;
-}
-tnet_stun_attribute_t;
-
-typedef tsk_list_t tnet_stun_attributes_L_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_def_t;
-
-#define TNET_STUN_DECLARE_ATTRIBUTE tnet_stun_attribute_t attribute
-
-
-/**@ingroup tnet_stun_group
- *RFC 5389 - 15.1. MAPPED-ADDRESS
- */
-typedef struct tnet_stun_attribute_mapped_addr_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |0 0 0 0 0 0 0 0| Family | Port |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- | Address (32 bits or 128 bits) |
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- tnet_stun_addr_family_t family;
- uint16_t port;
- uint8_t address[16];
-}
-tnet_stun_attribute_mapped_addr_t;
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_mapped_addr_def_t;
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.2. XOR-MAPPED-ADDRESS
-*/
-typedef struct tnet_stun_attribute_xmapped_addr_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |x x x x x x x x| Family | X-Port |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | X-Address (Variable)
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- tnet_stun_addr_family_t family;
- uint16_t xport;
- uint8_t xaddress[16];
-}
-tnet_stun_attribute_xmapped_addr_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_xmapped_addr_def_t;
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.3. USERNAME.
-*/
-typedef struct tnet_stun_attribute_username_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- char* value;
-}
-tnet_stun_attribute_username_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_username_def_t;
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.4. MESSAGE-INTEGRITY.
-*/
-typedef struct tnet_stun_attribute_integrity_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- tsk_sha1digest_t sha1digest;
-}
-tnet_stun_attribute_integrity_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_integrity_def_t;
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.5. FINGERPRINT.
-*/
-typedef struct tnet_stun_attribute_fingerprint_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- uint32_t value;
-}
-tnet_stun_attribute_fingerprint_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_fingerprint_def_t;
-
-/**@ingroup tnet_stun_group
- *RFC 5389 - 15.6. ERROR-CODE
-*/
-typedef struct tnet_stun_attribute_errorcode_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Reserved, should be 0 |Class| Number |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Reason Phrase (variable) ..
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- uint8_t _class;
- uint8_t number;
- char* reason_phrase;
-}
-tnet_stun_attribute_errorcode_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_errorcode_def_t;
-
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.7. REALM. */
-typedef struct tnet_stun_attribute_realm_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- char* value;
-}
-tnet_stun_attribute_realm_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_realm_def_t;
-
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.8. NONCE. */
-typedef struct tnet_stun_attribute_nonce_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- char* value;
-}
-tnet_stun_attribute_nonce_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_nonce_def_t;
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.9. UNKNOWN-ATTRIBUTES. */
-typedef struct tnet_stun_attribute_unknowns_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- tsk_buffer_t *value;
-}
-tnet_stun_attribute_unknowns_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_unknowns_def_t;
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.10. SOFTWARE. */
-typedef struct tnet_stun_attribute_software_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- char *value;
-}
-tnet_stun_attribute_software_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_software_def_t;
-
-/**@ingroup tnet_stun_group
-* RFC 5389 - 15.11. ALTERNATE-SERVER. */
-typedef struct tnet_stun_attribute_altserver_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- tnet_stun_addr_family_t family;
- uint16_t port;
- uint8_t server[128];
-}
-tnet_stun_attribute_altserver_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_attribute_altserver_def_t;
-
-
-tnet_stun_attribute_t* tnet_stun_attribute_deserialize(const void* data, tsk_size_t size);
-int tnet_stun_attribute_serialize(const tnet_stun_attribute_t* attribute, tsk_buffer_t *output);
-void tnet_stun_attribute_pad(const tnet_stun_attribute_t* attribute, tsk_buffer_t *output);
-
-
-
-
-tnet_stun_attribute_t* tnet_stun_attribute_create();
-tnet_stun_attribute_mapped_addr_t* tnet_stun_attribute_mapped_address_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_xmapped_addr_t* tnet_stun_attribute_xmapped_address_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_username_t* tnet_stun_attribute_username_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_integrity_t* tnet_stun_attribute_integrity_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_fingerprint_t* tnet_stun_attribute_fingerprint_create(uint32_t fingerprint);
-tnet_stun_attribute_errorcode_t* tnet_stun_attribute_errorcode_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_realm_t* tnet_stun_attribute_realm_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_nonce_t* tnet_stun_attribute_nonce_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_unknowns_t* tnet_stun_attribute_unknowns_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_software_t* tnet_stun_attribute_software_create(const void* payload, tsk_size_t payload_size);
-tnet_stun_attribute_altserver_t* tnet_stun_attribute_altserver_create(const void* payload, tsk_size_t payload_size);
-
-
-TNET_END_DECLS
-
-#endif /* TNET_STUN_ATTRIBUTE_H */
-
diff --git a/branches/1.0/tinyNET/src/stun/tnet_stun_message.c b/branches/1.0/tinyNET/src/stun/tnet_stun_message.c
deleted file mode 100644
index 9769092..0000000
--- a/branches/1.0/tinyNET/src/stun/tnet_stun_message.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_stun_message.c
- * @brief STUN2 (RFC 5389) message parser.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_stun_message.h"
-
-#include "tnet_stun.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-#include "../turn/tnet_turn_attribute.h"
-
-#include "tsk_memory.h"
-#include "tsk_hmac.h"
-#include "tsk_string.h"
-#include "tsk_ppfcs32.h"
-
-#include <string.h>
-
-
-/**@ingroup tnet_stun_group
-* Creates new STUN message.
-* @retval @ref tnet_stun_message_t object.
-* @sa tnet_stun_message_create_null.
-*/
-
-tnet_stun_message_t* tnet_stun_message_create(const char* username, const char* password)
-{
- return tsk_object_new(tnet_stun_message_def_t, username, password);
-}
-
-/**@ingroup tnet_stun_group
-* Creates new STUN message.
-* @retval @ref tnet_stun_message_t object.
-* @sa tnet_stun_message_create.
-*/
-tnet_stun_message_t* tnet_stun_message_create_null()
-{
- return tnet_stun_message_create(tsk_null, tsk_null);
-}
-
-#define SERIALIZE_N_ADD_ATTRIBUTE(att_name, payload, payload_size) \
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_##att_name##_create(payload, payload_size); \
- tnet_stun_attribute_serialize(attribute, output); \
- tnet_stun_attribute_pad(attribute, output); \
- TSK_OBJECT_SAFE_FREE(attribute);
-
-/**@ingroup tnet_stun_group
- * Serializes a STUN message as binary data.
- * @param [in,out] self The STUN message to serialize.
- * @retval A buffer holding the binary data (result) if serialization succeed and zero otherwise.
-**/
-tsk_buffer_t* tnet_stun_message_serialize(const tnet_stun_message_t *self)
-{
- tsk_buffer_t *output = 0;
- tnet_stun_attribute_t *attribute;
- unsigned compute_integrity = self->integrity;
-
- if(!self){
- goto bail;
- }
-
- output = tsk_buffer_create_null();
-
- /* RFC 5389 - 6. STUN Message Structure
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |0 0| STUN Message Type | Message Length |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Magic Cookie |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- | Transaction ID (96 bits) |
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
-
- /* STUN Message Type
- */
- {
- uint16_t type = tnet_htons(self->type);
- tsk_buffer_append(output, &(type), 2);
- }
-
- /* Message Length ==> Will be updated after attributes have been added. */
- {
- uint16_t length = 0;
- tsk_buffer_append(output, &(length), 2);
- }
-
- /* Magic Cookie
- */
- {
- uint32_t cookie = tnet_htonl(self->cookie);
- tsk_buffer_append(output, &(cookie), 4);
- }
-
-
- /* Transaction ID (96 bits==>16bytes)
- */
- tsk_buffer_append(output, self->transaction_id, TNET_STUN_TRANSACID_SIZE);
-
- /* DONT-FRAGMENT
- */
- if(self->dontfrag){
- attribute = (tnet_stun_attribute_t *)tnet_turn_attribute_dontfrag_create();
- tnet_stun_attribute_serialize(attribute, output);
- TSK_OBJECT_SAFE_FREE(attribute);
- }
-
- /*=== Attributes ===
- */
- {
- tsk_list_item_t *item;
- tsk_list_foreach(item, self->attributes)
- {
- attribute = item->data;
- tnet_stun_attribute_serialize(attribute, output);
- tnet_stun_attribute_pad(attribute, output);
- }
- }
-
- /* AUTHENTICATION */
- if(self->realm && self->nonce){
- SERIALIZE_N_ADD_ATTRIBUTE(username, self->username, tsk_strlen(self->username));
- SERIALIZE_N_ADD_ATTRIBUTE(realm, self->realm, tsk_strlen(self->realm));
- SERIALIZE_N_ADD_ATTRIBUTE(nonce, self->nonce, tsk_strlen(self->nonce));
-
- compute_integrity = 1;
- }
-
- /* Message Length: The message length MUST contain the size, in bytes, of the message
- not including the 20-byte STUN header.
- */
- {
- uint16_t length = (output->size) - TNET_STUN_HEADER_SIZE;
- if(self->fingerprint)
- length += (2/* Type */ + 2 /* Length */+ 4 /* FINGERPRINT VALUE*/);
-
- if(compute_integrity)
- length += (2/* Type */ + 2 /* Length */+ TSK_SHA1_DIGEST_SIZE /* INTEGRITY VALUE*/);
-
- *(((uint16_t*)output->data)+1) = tnet_htons(length);
- }
-
- /* MESSAGE-INTEGRITY */
- if(compute_integrity){
- /* RFC 5389 - 15.4. MESSAGE-INTEGRITY
- The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [RFC2104] of the STUN message.
-
- For long-term credentials ==> key = MD5(username ":" realm ":" SASLprep(password))
- For short-term credentials ==> key = SASLprep(password)
- FIXME: what about short term credentials?
- FIXME: what about SASLprep
- */
- char* keystr = 0;
- tsk_sha1digest_t hmac;
- tsk_md5digest_t md5;
-
- tsk_sprintf(&keystr, "%s:%s:%s", self->username, self->realm, self->password);
- TSK_MD5_DIGEST_CALC(keystr, tsk_strlen(keystr), md5);
- hmac_sha1digest_compute(output->data, output->size, (const char*)md5, TSK_MD5_DIGEST_SIZE, hmac);
-
- SERIALIZE_N_ADD_ATTRIBUTE(integrity, hmac, TSK_SHA1_DIGEST_SIZE);
-
- TSK_FREE(keystr);
- }
-
- /* FINGERPRINT */
- if(self->fingerprint){
- /* RFC 5389 - 15.5. FINGERPRINT
- The FINGERPRINT attribute MAY be present in all STUN messages. The
- value of the attribute is computed as the CRC-32 of the STUN message
- up to (but excluding) the FINGERPRINT attribute itself, XOR'ed with
- the 32-bit value 0x5354554e
- */
- uint32_t fingerprint = tsk_pppfcs32(TSK_PPPINITFCS32, output->data, output->size);
- fingerprint ^= 0x5354554e;
- fingerprint = tnet_htonl(fingerprint);
-
- attribute = (tnet_stun_attribute_t *)tnet_stun_attribute_fingerprint_create(fingerprint);
- tnet_stun_attribute_serialize(attribute, output);
- TSK_OBJECT_SAFE_FREE(attribute);
- }
-
-bail:
- return output;
-}
-
-
-/**@ingroup tnet_stun_group
- *
- * Deserializes a STUN message from binary data.
- *
- * @param [in,out] data A pointer to the binary data.
- * @param size The size of the binary data.
- *
- * @retval A STUN message if deserialization succeed or NULL otherwise.
-**/
-tnet_stun_message_t* tnet_stun_message_deserialize(const uint8_t *data, tsk_size_t size)
-{
- tnet_stun_message_t *message = 0;
- uint8_t* dataPtr, *dataEnd;
-
-
- if(!data || (size < TNET_STUN_HEADER_SIZE) || !TNET_IS_STUN2(data))
- {
- goto bail;
- }
-
- dataPtr = (uint8_t*)data;
- dataEnd = (dataPtr + size);
-
- message = tnet_stun_message_create_null();
-
- /* Message Type
- */
- message->type = (tnet_stun_message_type_t)tnet_ntohs_2(dataPtr);
- dataPtr += 2;
-
- /* Message Length
- */
- message->length = tnet_ntohs_2(dataPtr);
- dataPtr += 2;
-
- /* Check message validity
- */
- if((message->length + TNET_STUN_HEADER_SIZE) != size)
- {
- TSK_OBJECT_SAFE_FREE(message);
- goto bail;
- }
-
- /* Magic Cookie
- ==> already set by the constructor and checked by @ref TNET_IS_STUN2
- */
- dataPtr += 4;
-
- /* Transaction ID
- */
- memcpy(message->transaction_id, dataPtr, TNET_STUN_TRANSACID_SIZE);
- dataPtr += TNET_STUN_TRANSACID_SIZE;
-
- /* == Parse attributes
- */
- while(dataPtr < dataEnd){
- tnet_stun_attribute_t *attribute = tnet_stun_attribute_deserialize(dataPtr, (dataEnd - dataPtr));
- if(attribute){
- tsk_size_t att_size = (attribute->length + 2 /* Type*/ + 2/* Length */);
- att_size += (att_size%4) ? 4-(att_size%4) : 0; // Skip zero bytes used to pad the attribute.
-
- dataPtr += att_size;
- tsk_list_push_back_data(message->attributes, (void**)&attribute);
-
- continue;
- }
- else{
- continue;
- }
-
-
-
-
- }
-
-
-bail:
- return message;
-}
-
-/**@ingroup tnet_stun_group
-* Adds an attribute to a STUN message.
-* @param self The STUN message into which to add the attribute.
-* @param attribute The attribute to add.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_stun_message_add_attribute(tnet_stun_message_t *self, tnet_stun_attribute_t** attribute)
-{
- //if(self && attribute)
- {
- tsk_list_push_back_data(self->attributes, (void**)attribute);
- return 0;
- }
- return -1;
-}
-
-/**@ingroup tnet_stun_group
-* Gets a STUN attribute from a message.
-* @param self The message from which to get the attribute.
-* @param type The type of the attribute to retrieve.
-* @retval @ref tnet_stun_attribute_t object if found and NULL otherwise.
-*/
-const tnet_stun_attribute_t* tnet_stun_message_get_attribute(const tnet_stun_message_t *self, tnet_stun_attribute_type_t type)
-{
- tnet_stun_attribute_t* attribute;
-
- if(self && !TSK_LIST_IS_EMPTY(self->attributes)){
- tsk_list_item_t *item;
- tsk_list_foreach(item, self->attributes){
- if((attribute = item->data) && attribute->type == type){
- return attribute;
- }
- }
- }
- return 0;
-}
-
-/**@ingroup tnet_stun_group
-* Gets the STUN error-code attribute value from the message.
-* @param self The STUN message from which to get the error code.
-* @retval The error code if the message contain such attribute or -1 otherwise.
-*/
-short tnet_stun_message_get_errorcode(const tnet_stun_message_t *self)
-{
- const tnet_stun_attribute_errorcode_t* error = (const tnet_stun_attribute_errorcode_t*)tnet_stun_message_get_attribute(self, stun_error_code);
- if(error){
- return ((error->_class*100) + error->number);
- }
- return -1;
-}
-
-/**@ingroup tnet_stun_group
-* Gets the STUN @b realm attribute value from the message.
-* @param self The STUN message from which to get the @b realm.
-* @retval The @b realm as a string pointer code if the message contain such attribute or NULL otherwise.
-*/
-const char* tnet_stun_message_get_realm(const tnet_stun_message_t *self)
-{
- const tnet_stun_attribute_realm_t* realm = (const tnet_stun_attribute_realm_t*)tnet_stun_message_get_attribute(self, stun_realm);
- if(realm){
- return realm->value;
- }
- return 0;
-}
-
-/**@ingroup tnet_stun_group
-* Gets the STUN @b nonce attribute value from the message.
-* @param self The STUN message from which to get the @b nonce.
-* @retval The @b nonce as a string pointer code if the message contain such attribute or NULL otherwise.
-*/
-const char* tnet_stun_message_get_nonce(const tnet_stun_message_t *self)
-{
- const tnet_stun_attribute_nonce_t* nonce = (const tnet_stun_attribute_nonce_t*)tnet_stun_message_get_attribute(self, stun_nonce);
- if(nonce){
- return nonce->value;
- }
- return 0;
-}
-
-/**@ingroup tnet_stun_group
-* Gets the STUN @b lifetime attribute value from the message.
-* @param self The STUN message from which to get the @b lifetime.
-* @retval The @b lifetime (any positive value) if the message contain such attribute or -1 otherwise.
-*/
-int32_t tnet_stun_message_get_lifetime(const tnet_stun_message_t *self)
-{
- const tnet_turn_attribute_lifetime_t* lifetime = (const tnet_turn_attribute_lifetime_t*)tnet_stun_message_get_attribute(self, stun_lifetime);
- if(lifetime){
- return lifetime->value;
- }
- return -1;
-}
-
-
-
-
-
-
-
-
-
-//=================================================================================================
-// STUN2 MESSAGE object definition
-//
-static tsk_object_t* tnet_stun_message_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_stun_message_t *message = self;
- if(message){
- message->username = tsk_strdup(va_arg(*app, const char*));
- message->password = tsk_strdup(va_arg(*app, const char*));
-
- message->cookie = TNET_STUN_MAGIC_COOKIE;
- message->attributes = tsk_list_create();
-
- message->fingerprint = 1;
- message->integrity = 0;
- }
- return self;
-}
-
-static tsk_object_t* tnet_stun_message_dtor(tsk_object_t * self)
-{
- tnet_stun_message_t *message = self;
- if(message){
- TSK_FREE(message->username);
- TSK_FREE(message->password);
- TSK_FREE(message->realm);
- TSK_FREE(message->nonce);
-
- TSK_OBJECT_SAFE_FREE(message->attributes);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_stun_message_def_s =
-{
- sizeof(tnet_stun_message_t),
- tnet_stun_message_ctor,
- tnet_stun_message_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_stun_message_def_t = &tnet_stun_message_def_s;
-
diff --git a/branches/1.0/tinyNET/src/stun/tnet_stun_message.h b/branches/1.0/tinyNET/src/stun/tnet_stun_message.h
deleted file mode 100644
index 862c7b6..0000000
--- a/branches/1.0/tinyNET/src/stun/tnet_stun_message.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_stun_message.h
- * @brief STUN2 (RFC 5389) message parser.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_STUN_MESSAGE_H
-#define TNET_STUN_MESSAGE_H
-
-#include "tinynet_config.h"
-#include "stun/tnet_stun_attribute.h"
-
-#include "tsk_buffer.h"
-
-TNET_BEGIN_DECLS
-
-#define TNET_STUN_CLASS_REQUEST_MASK (0x0000)
-#define TNET_STUN_CLASS_INDICATION_MASK (0x0010)
-#define TNET_STUN_CLASS_SUCCESS_MASK (0x0100)
-#define TNET_STUN_CLASS_ERROR_MASK (0x0110)
-
-/**@ingroup tnet_stun_group
-* @def TNET_STUN_RESPONSE_IS_REQUEST
-* Checks whether the STUN message is a request or not.
-*/
-/**@ingroup tnet_stun_group
-* @def TNET_STUN_RESPONSE_IS_INDICATION
-* Checks whether the STUN message is an indicaton message or not.
-*/
-/**@ingroup tnet_stun_group
-* @def TNET_STUN_RESPONSE_IS_SUCCESS
-* Checks whether the STUN message is a success response or not.
-*/
-/**@ingroup tnet_stun_group
-* @def TNET_STUN_RESPONSE_IS_ERROR
-* Checks whether the STUN message is an error response or not.
-*/
-#define TNET_STUN_RESPONSE_IS_REQUEST(self) ((self->type & TNET_STUN_CLASS_REQUEST_MASK) == TNET_STUN_CLASS_REQUEST_MASK)
-#define TNET_STUN_RESPONSE_IS_INDICATION(self) ((self->type & TNET_STUN_CLASS_INDICATION_MASK) == TNET_STUN_CLASS_INDICATION_MASK)
-#define TNET_STUN_RESPONSE_IS_SUCCESS(self) ((self->type & TNET_STUN_CLASS_SUCCESS_MASK) == TNET_STUN_CLASS_SUCCESS_MASK)
-#define TNET_STUN_RESPONSE_IS_ERROR(self) ((self->type & TNET_STUN_CLASS_ERROR_MASK) == TNET_STUN_CLASS_ERROR_MASK)
-
-/**@ingroup tnet_stun_group
- * Checks if the pointer to the buffer hold a STUN header by checking that it starts with 0b00 and contain the magic cookie.
- * As per RFC 5389 subclause 19: Explicitly point out that the most significant 2 bits of STUN are
- * 0b00, allowing easy differentiation with RTP packets when used with ICE.
- * As per RFC 5389 subclause 6: The magic cookie field MUST contain the fixed value 0x2112A442 in
- * network byte order.
- *
- * @param PU8 The pointer to the buffer holding the STUN raw data.
-**/
-#define TNET_IS_STUN2(PU8) \
- (((PU8)[0] & 0xc0) == 0x00) && \
- ( (*(((uint32_t *)(PU8))+1)) == tnet_htonl(TNET_STUN_MAGIC_COOKIE) )
-
-/**@ingroup tnet_stun_group
- * STUN trasactionn ID size (96bits = 12bytes).
-*/
-#define TNET_STUN_TRANSACID_SIZE 12
-
-/**@ingroup tnet_stun_group
- * Defines an alias representing the STUN transaction id type.
-**/
-typedef uint8_t tnet_stun_transacid_t[TNET_STUN_TRANSACID_SIZE];
-
-/**@ingroup tnet_stun_group
- * List of all supported STUN classes as per RFC 5389 subcaluse 6.
-**/
-typedef enum tnet_stun_class_type_e
-{
- stun_class_request = 0x00, /**< Request class: 0b00 */
- stun_class_indication = 0x01, /**< Indication class: 0b01 */
- stun_class_success_response = 0x02, /**< Success response class: 0b10 */
- stun_class_error_response = 0x03, /**< Error/failure response class: 0b11 */
-}
-tnet_stun_class_type_t;
-
-/**@ingroup tnet_stun_group
- * List of all supported STUN methods.
- * RFC 5389 only define one method(Bining). All other methods have been defined
- * by TURN (draft-ietf-behave-turn-16 and draft-ietf-behave-turn-tcp-05).
-**/
-typedef enum tnet_stun_method_type_e
-{
- stun_method_binding = 0x0001, /**< RFC 5389 - Binding method: 0b000000000001 */
-
- stun_method_allocate = 0x0003, /**< draft-ietf-behave-turn-16 - Allocate (only request/response semantics defined) */
- stun_method_refresh = 0x0004, /**< draft-ietf-behave-turn-16 - Refresh (only request/response semantics defined) */
- stun_method_send = 0x0006, /**< draft-ietf-behave-turn-16 - Send (only indication semantics defined) */
- stun_method_data = 0x0007, /**< draft-ietf-behave-turn-16 - Data (only indication semantics defined) */
- stun_method_createpermission = 0x0008, /**< draft-ietf-behave-turn-16 - CreatePermission (only request/response semantics defined */
- stun_method_channelbind = 0x0009, /**< draft-ietf-behave-turn-16 - ChannelBind (only request/response semantics defined) */
-}
-tnet_stun_method_type_t;
-
-/**@ingroup tnet_stun_group
-* List of all supported STUN types.
-*/
-typedef enum tnet_stun_message_type_e
-{
- /* RFC 5389 - 6. STUN Message Structure
-
- The message type defines the message class (request, success
- response, failure response, or indication) and the message method
- (the primary function) of the STUN message. Although there are four
- message classes, there are only two types of transactions in STUN:
- request/response transactions (which consist of a request message and
- a response message) and indication transactions (which consist of a
- single indication message). Response classes are split into error
- and success responses to aid in quickly processing the STUN message.
-
- The message type field is decomposed further into the following
- structure:
-
- 0 1
- 2 3 4 5 6 7 8 9 0 1 2 3 4 5
- +--+--+-+-+-+-+-+-+-+-+-+-+-+-+
- |M |M |M|M|M|C|M|M|M|C|M|M|M|M|
- |11|10|9|8|7|1|6|5|4|0|3|2|1|0|
- +--+--+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- stun_binding_request = (stun_method_binding | TNET_STUN_CLASS_REQUEST_MASK),
- stun_binding_indication = (stun_method_binding | TNET_STUN_CLASS_INDICATION_MASK),
- stun_binding_success_response = (stun_method_binding | TNET_STUN_CLASS_SUCCESS_MASK),
- stun_binding_error_response = (stun_method_binding | TNET_STUN_CLASS_ERROR_MASK),
-
- stun_allocate_request = (stun_method_allocate | TNET_STUN_CLASS_REQUEST_MASK),
- stun_allocate_indication = (stun_method_allocate | TNET_STUN_CLASS_INDICATION_MASK),
- stun_allocate_success_response = (stun_method_allocate | TNET_STUN_CLASS_SUCCESS_MASK),
- stun_allocate_error_response = (stun_method_allocate | TNET_STUN_CLASS_ERROR_MASK),
-
- stun_refresh_request = (stun_method_refresh | TNET_STUN_CLASS_REQUEST_MASK),
- stun_refresh_indication = (stun_method_refresh | TNET_STUN_CLASS_INDICATION_MASK),
- stun_refresh_success_response = (stun_method_refresh | TNET_STUN_CLASS_SUCCESS_MASK),
- stun_refresh_error_response = (stun_method_refresh | TNET_STUN_CLASS_ERROR_MASK),
-
- stun_send_indication = (stun_method_send | TNET_STUN_CLASS_INDICATION_MASK),
-
- stun_data_indication = (stun_method_data | TNET_STUN_CLASS_INDICATION_MASK),
-
- stun_createpermission_request = (stun_method_createpermission | TNET_STUN_CLASS_REQUEST_MASK),
- stun_createpermission_indication = (stun_method_createpermission | TNET_STUN_CLASS_INDICATION_MASK),
- stun_createpermission_success_response = (stun_method_createpermission | TNET_STUN_CLASS_SUCCESS_MASK),
- stun_createpermission_error_response = (stun_method_createpermission | TNET_STUN_CLASS_ERROR_MASK),
-
- stun_channelbind_request = (stun_method_channelbind | TNET_STUN_CLASS_REQUEST_MASK),
- stun_channelbind_indication = (stun_method_channelbind | TNET_STUN_CLASS_INDICATION_MASK),
- stun_channelbind_success_response = (stun_method_channelbind | TNET_STUN_CLASS_SUCCESS_MASK),
- stun_channelbind_error_response = (stun_method_channelbind | TNET_STUN_CLASS_ERROR_MASK),
-}
-tnet_stun_message_type_t;
-
-/**@ingroup tnet_stun_group
- *
- * STUN Message structure as per RFC 5389 subclause 6.
- * http://tools.ietf.org/html/rfc5389#section-6
-*/
-typedef struct tnet_stun_message_s
-{
- TSK_DECLARE_OBJECT;
-
- /*
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |0 0| STUN Message Type | Message Length |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Magic Cookie |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- | Transaction ID (96 bits) |
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
-
- tnet_stun_message_type_t type;
- uint16_t length;
- uint32_t cookie;
- tnet_stun_transacid_t transaction_id;
-
- unsigned fingerprint:1;
- unsigned integrity:1;
- unsigned dontfrag:1;
-
- char* username;
- char* password;
- char* realm;
- char* nonce;
-
- tnet_stun_attributes_L_t *attributes; /**< List of all attributes associated to this message */
-}
-tnet_stun_message_t;
-
-typedef tnet_stun_message_t tnet_stun_response_t;
-typedef tnet_stun_message_t tnet_stun_request_t;
-
-tsk_buffer_t* tnet_stun_message_serialize(const tnet_stun_message_t *message);
-tnet_stun_message_t* tnet_stun_message_deserialize(const uint8_t *data, tsk_size_t size);
-int tnet_stun_message_add_attribute(tnet_stun_message_t *self, tnet_stun_attribute_t** attribute);
-const tnet_stun_attribute_t* tnet_stun_message_get_attribute(const tnet_stun_message_t *self, tnet_stun_attribute_type_t type);
-short tnet_stun_message_get_errorcode(const tnet_stun_message_t *self);
-const char* tnet_stun_message_get_realm(const tnet_stun_message_t *self);
-const char* tnet_stun_message_get_nonce(const tnet_stun_message_t *self);
-int32_t tnet_stun_message_get_lifetime(const tnet_stun_message_t *self);
-
-
-tnet_stun_message_t* tnet_stun_message_create(const char* username, const char* password);
-tnet_stun_message_t* tnet_stun_message_create_null();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_stun_message_def_t;
-
-
-TNET_END_DECLS
-
-
-#endif /* TNET_STUN_MESSAGE_H */
-
diff --git a/branches/1.0/tinyNET/src/tinynet.h b/branches/1.0/tinyNET/src/tinynet.h
deleted file mode 100644
index 853cc17..0000000
--- a/branches/1.0/tinyNET/src/tinynet.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tinynet.h
- * @brief API functions.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TINYNET_H
-#define TNET_TINYNET_H
-
-/* === tinySAK === */
-#include "tsk.h"
-
-/* === tinyNET === */
-
-#include "tnet.h"
-#include "tnet_nat.h"
-#include "tnet_socket.h"
-#include "tnet_transport.h"
-
-#include "stun/tnet_stun.h"
-
-#include "dns/tnet_dns.h"
-#include "dns/tnet_dns_naptr.h"
-#include "dns/tnet_dns_regexp.h"
-#include "dns/tnet_dns_resolvconf.h"
-
-#include "dhcp/tnet_dhcp.h"
-#include "dhcp/tnet_dhcp_option_sip.h"
-
-#include "dhcp6/tnet_dhcp6.h"
-#include "dhcp6/tnet_dhcp6_option.h"
-
-
-#endif /* TNET_TINYNET_H */
-
diff --git a/branches/1.0/tinyNET/src/tinynet_config.h b/branches/1.0/tinyNET/src/tinynet_config.h
deleted file mode 100644
index 31259b8..0000000
--- a/branches/1.0/tinyNET/src/tinynet_config.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tinynet_config.h
- * @brief Global configuration file.
- *
- * This file incude all your preferences or configuration. All specific configuration
- * must be defined in this file. You must include this file in all your header files.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef _TINYNET_H_
-#define _TINYNET_H_
-
-#ifdef __SYMBIAN32__
-#undef _WIN32 /* Because of WINSCW */
-#endif
-
-/* Windows (XP/Vista/7/CE and Windows Mobile) macro definition.
-*/
-#if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
-# define TNET_UNDER_WINDOWS 1
-#endif
-
-/**@def TINYNET_API
-* Used on Windows and Sysbian systems to export public functions.
-*/
-#if !defined(__GNUC__) && defined(TINYNET_EXPORTS)
-# define TINYNET_API __declspec(dllexport)
-# define TINYNET_GEXTERN __declspec(dllexport)
-#elif !defined(__GNUC__) /*&& defined(TINYNET_IMPORTS)*/
-# define TINYNET_API __declspec(dllimport)
-# define TINYNET_GEXTERN __declspec(dllimport)
-#else
-# define TINYNET_API
-# define TINYNET_GEXTERN extern
-#endif
-
-/* Guards against C++ name mangling
-*/
-#ifdef __cplusplus
-# define TNET_BEGIN_DECLS extern "C" {
-# define TNET_END_DECLS }
-#else
-# define TNET_BEGIN_DECLS
-# define TNET_END_DECLS
-#endif
-
-#if defined(_MSC_VER)
-# define TNET_INLINE __forceinline
-#elif defined(__GNUC__) && !defined(__APPLE__)
-# define TNET_INLINE __inline
-#else
-# define TNET_INLINE
-#endif
-
-/* have poll()? */
-#if (_WIN32_WINNT>=0x0600) || (ANDROID) || defined(__APPLE__)
-# define TNET_HAVE_POLL 1
-#else
-# define TNET_HAVE_POLL 0
-#endif
-
-/* whether to use poll() */
-#if TNET_UNDER_WINDOWS
-# define TNET_USE_POLL 0 /* Do not use WSAPoll event if under Vista. */
-#else
-# define TNET_USE_POLL 1
-#endif
-
-#if defined(__APPLE__)
-# define HAVE_IFADDRS 1
-# define HAVE_DNS_H 1
-# define TNET_HAVE_SS_LEN 1
-# define TNET_HAVE_SA_LEN 1
-#else
-# define HAVE_IFADDRS 0
-# define HAVE_DNS_H 0
-# define TNET_HAVE_SS_LEN 0
-# define TNET_HAVE_SA_LEN 0
-#endif
-
-/* Used in TURN/STUN2 attributes. */
-#define TNET_SOFTWARE "IM-client/OMA1.0 doubango/v0.0.0"
-#define TNET_IANA_PEN 35368 /**< PEN number assigned by the IANA.
- The list of assigned numbers could be found here http://www.iana.org/assignments/enterprise-numbers. */
-#define TNET_RESOLV_CONF_PATH "/etc/resolv.conf" /**< Path to "/resolv.conf". */
-
-#include <stdint.h>
-
-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
-
-#endif /* _TINYNET_H_ */
-
-
diff --git a/branches/1.0/tinyNET/src/tls/tnet_tls.c b/branches/1.0/tinyNET/src/tls/tnet_tls.c
deleted file mode 100644
index ea3ec28..0000000
--- a/branches/1.0/tinyNET/src/tls/tnet_tls.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_tls.c
- * @brief TLS utilitity functions, based on openssl.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_tls.h"
-
-#include "tnet_utils.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-#include "tsk_debug.h"
-#include "tsk_safeobj.h"
-#include "tsk_thread.h"
-
-#define TNET_CIPHER_LIST "AES128-SHA"
-
-#if TNET_HAVE_OPENSSL_H
-# include <openssl/ssl.h>
-#endif
-
-#define TNET_TLS_TIMEOUT 2000
-#define TNET_TLS_RETRY_COUNT 5
-
-typedef struct tnet_tls_socket_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_fd_t fd;
-
- /* certs */
- char* tlsdir_cas; /* Trusted CAs directory. */
- char* tlsfile_ca;
- char* tlsfile_pvk;
- char* tlsfile_pbk;
- char* password; /* password for the private vkey */
-
-#if TNET_HAVE_OPENSSL_H
- /* SSL */
- SSL_METHOD *ssl_meth;
- SSL_CTX *ssl_ctx;
- SSL *ssl;
-#endif
-
- unsigned initialized;
- tsk_bool_t isClient;
- tsk_bool_t mutual_auth;
-
- TSK_DECLARE_SAFEOBJ;
-}
-tnet_tls_socket_t;
-
-
-tnet_tls_socket_handle_t* tnet_tls_socket_create(tnet_fd_t fd, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk, tsk_bool_t isClient)
-{
- return tsk_object_new(tnet_tls_socket_def_t, fd, tlsfile_ca, tlsfile_pvk, tlsfile_pbk, isClient);
-}
-
-tnet_tls_socket_handle_t* tnet_tls_socket_client_create(tnet_fd_t fd, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk)
-{
- return tnet_tls_socket_create(fd, tlsfile_ca, tlsfile_pvk, tlsfile_pbk, tsk_true);
-}
-
-tnet_tls_socket_handle_t* tnet_tls_socket_server_create(tnet_fd_t fd, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk)
-{
- return tnet_tls_socket_create(fd, tlsfile_ca, tlsfile_pvk, tlsfile_pbk, tsk_false);
-}
-
-
-int tnet_tls_socket_isok(const tnet_tls_socket_handle_t* self)
-{
- if(!self){
- return 0;
- }
- else return ((const tnet_tls_socket_t*)self)->initialized;
-}
-
-int tnet_tls_socket_connect(tnet_tls_socket_handle_t* self)
-{
-#if !TNET_HAVE_OPENSSL_H
- TSK_DEBUG_ERROR("You MUST enable OpenSSL");
- return -200;
-#else
- int ret = -1;
- tnet_tls_socket_t* socket;
-#if defined(DEBUG) || defined(_DEBUG)
- X509* svr_cert;
-#endif
-
- if(!self){
- return -1;
- }
-
- socket = self;
-
- if(!socket->initialized){
- TSK_DEBUG_ERROR("TLS socket not properly initialized.");
- return -2;
- }
-
- //ret = SSL_do_handshake(socket->ssl);
- if((ret = SSL_connect(socket->ssl)) != 1){
- ret = SSL_get_error(socket->ssl, ret);
- if(ret == SSL_ERROR_WANT_WRITE || ret == SSL_ERROR_WANT_READ || ret == SSL_ERROR_SYSCALL){
- ret = 0; /* Up to the caller to check that the socket is writable and valid. */
- }
- else{
- TSK_DEBUG_ERROR("SSL_connect failed [%d].", ret);
- //if(ret == SSL_ERROR_SYSCALL){
- // TNET_PRINT_LAST_ERROR("SSL_connect returned SSL_ERROR_SYSCALL:");
- //}
- }
- }
- else ret = 0;
-
-#if defined(DEBUG) || defined(_DEBUG)
- /* Print Server cert */
- if((ret == 0) && (svr_cert = SSL_get_peer_certificate(socket->ssl))) {
- TSK_DEBUG_INFO("Server cert - Subject: %s", X509_NAME_oneline(X509_get_subject_name(svr_cert), 0, 0));
- TSK_DEBUG_INFO("Server cert - Issuer: %s", X509_NAME_oneline(X509_get_issuer_name(svr_cert), 0, 0));
- X509_free(svr_cert);
- }
-#endif
-
- return ret;
-#endif
-}
-
-int tnet_tls_socket_write(tnet_tls_socket_handle_t* self, const void* data, tsk_size_t size)
-{
-#if !TNET_HAVE_OPENSSL_H
- TSK_DEBUG_ERROR("You MUST enable OpenSSL");
- return -200;
-#else
- int ret = -1;
- int rcount = TNET_TLS_RETRY_COUNT;
- tnet_tls_socket_t* socket;
-
- if(!self){
- return -1;
- }
-
- socket = self;
-
- if(!socket->initialized){
- TSK_DEBUG_ERROR("TLS socket not properly initialized.");
- return -2;
- }
-
- /* Write */
- tsk_safeobj_lock(socket);
-ssl_write:
- if(rcount && ((ret = SSL_write(socket->ssl, data, size)) <= 0)){
- int want_read;
- ret = SSL_get_error(socket->ssl, ret);
- want_read = (ret == SSL_ERROR_WANT_READ);
-
- if(ret == SSL_ERROR_WANT_WRITE || want_read){
-
- if(!(ret = tnet_sockfd_waitUntil(socket->fd, TNET_TLS_TIMEOUT, !want_read))){
- rcount--;
-
- if(want_read && !SSL_is_init_finished(socket->ssl)){
- tsk_thread_sleep(200); // FIXME
- }
- goto ssl_write;
- }
-
- //if(ret == SSL_ERROR_WANT_READ){
- // if(!SSL_is_init_finished(socket->ssl)){
- // tsk_size_t size = 1024;
- // char* buffer = tsk_calloc(size, sizeof(uint8_t));
- // int isEncrypted = 1;
- //
- // // read()
- // tsk_safeobj_unlock(socket);
- // tnet_tls_socket_recv(socket, &buffer, &size, &isEncrypted);
- // TSK_FREE(buffer);
- // tsk_safeobj_lock(socket);
- // }
- // rcount--;
- // goto ssl_write;
- //}
- //else{
- // if(!(ret = tnet_sockfd_waitUntilWritable(socket->fd, TNET_TLS_TIMEOUT))){
- // rcount--;
- // goto ssl_write;
- // }
- // else goto bail;
- //}
-
- }
- else{
- TSK_DEBUG_ERROR("SSL_write failed [%d].", ret);
- ret = -3;
- }
- }
- tsk_safeobj_unlock(socket);
-
-//bail:
- ret = (ret > 0) ? 0 : -3;
- return ret;
-#endif
-}
-
-int tnet_tls_socket_recv(tnet_tls_socket_handle_t* self, void** data, tsk_size_t *size, int *isEncrypted)
-{
-#if !TNET_HAVE_OPENSSL_H
- TSK_DEBUG_ERROR("You MUST enable OpenSSL");
- return -200;
-#else
- int ret = -1;
- tsk_size_t read = 0;
- tsk_size_t to_read = *size;
- int rcount = TNET_TLS_RETRY_COUNT;
- tnet_tls_socket_t* socket;
-
- if(!self){
- return -1;
- }
-
- socket = self;
-
- if(!socket->initialized){
- TSK_DEBUG_ERROR("TLS socket not properly initialized.");
- return -2;
- }
-
- tsk_safeobj_lock(socket);
-
- *isEncrypted = SSL_is_init_finished(socket->ssl) ? 0 : 1;
-
- /* SSL handshake has completed? */
- if(*isEncrypted){
- char* buffer[1024];
- if((ret = SSL_read(socket->ssl, buffer, 1024)) <= 0){
- ret = SSL_get_error(socket->ssl, ret);
- if(ret == SSL_ERROR_WANT_WRITE || ret == SSL_ERROR_WANT_READ){
- ret = 0;
- }
- *size = 0;
- }
- else{
- *size = ret;
- ret = 0;
- }
-
- goto bail;
- }
-
- /* Read Application data */
-ssl_read:
- if(rcount && ((ret = SSL_read(socket->ssl, (((uint8_t*)*data)+read), to_read)) <= 0)){
- ret = SSL_get_error(socket->ssl, ret);
- if(ret == SSL_ERROR_WANT_WRITE || ret == SSL_ERROR_WANT_READ){
- if(!(ret = tnet_sockfd_waitUntil(socket->fd, TNET_TLS_TIMEOUT, (ret == SSL_ERROR_WANT_WRITE)))){
- rcount--;
- goto ssl_read;
- }
- }
- else if(SSL_ERROR_ZERO_RETURN){ /* connection closed: do nothing, the transport layer will be alerted. */
- *size = ret;
- ret = 0;
- TSK_DEBUG_INFO("TLS connection closed.");
- }
- else{
- TSK_DEBUG_ERROR("SSL_read failed [%d].", ret);
- }
- }
- else if(ret >=0){
- read += (tsk_size_t)ret;
-
- if((ret = SSL_pending(socket->ssl)) > 0){
- void *ptr;
- to_read = ret;
-
- if((ptr = tsk_realloc(*data, (read + to_read)))){
- *data = ptr;
- goto ssl_read;
- }
- }
- }
-
-bail:
- tsk_safeobj_unlock(socket);
-
- if(read){
- *size = read;
- return 0;
- }
- else{
- return ret;
- }
-#endif
-}
-
-int tnet_tls_socket_init(tnet_tls_socket_t* socket)
-{
-#if !TNET_HAVE_OPENSSL_H
- TSK_DEBUG_ERROR("You MUST enable OpenSSL");
- return -200;
-#else
- int ret = -1;
-
- if(!socket){
- return ret;
- }
-
- /* Sets SSL method */
- socket->ssl_meth = socket->isClient ? TLSv1_client_method() : TLSv1_server_method();
-
- /* Creates the context */
- if(!(socket->ssl_ctx = SSL_CTX_new(socket->ssl_meth))){
- return -3;
- }
- else{
- SSL_CTX_set_mode(socket->ssl_ctx, SSL_MODE_AUTO_RETRY);
- }
-
- /*Set cipher list*/
- if((ret = SSL_CTX_set_cipher_list(socket->ssl_ctx, TNET_CIPHER_LIST)) <= 0){
- TSK_DEBUG_ERROR("SSL_CTX_set_cipher_list failed [%d]", ret);
- return -4;
- }
-
- /* CLIENT */
- if(socket->isClient){
- if(socket->mutual_auth){ /* Mutual authentication */
- /* Sets Public key (cert) */
- if((ret = SSL_CTX_use_certificate_file(socket->ssl_ctx, socket->tlsfile_pbk, SSL_FILETYPE_PEM)) <= 0) {
- TSK_DEBUG_ERROR("SSL_CTX_use_certificate_file failed [%d].", ret);
- return -3;
- }
- /*Sets the password of the private key*/
- SSL_CTX_set_default_passwd_cb_userdata(socket->ssl_ctx, socket->password);
-
- /* Sets Private key (cert) */
- if ((ret = SSL_CTX_use_PrivateKey_file(socket->ssl_ctx, socket->tlsfile_pvk, SSL_FILETYPE_PEM)) <= 0) {
- TSK_DEBUG_ERROR("SSL_CTX_use_PrivateKey_file failed [%d].", ret);
- return -4;
- }
- /* Checks private key */
- if(SSL_CTX_check_private_key(socket->ssl_ctx) == 0) {
- TSK_DEBUG_ERROR("SSL_CTX_check_private_key failed.");
- return -5;
- }
- /* Sets trusted CAs and CA file */
- if((ret = SSL_CTX_load_verify_locations(socket->ssl_ctx, socket->tlsfile_ca, socket->tlsdir_cas)) < 1) {
- TSK_DEBUG_ERROR("SSL_CTX_load_verify_locations failed [%s].", ret);
- return -5;
- }
- /* Server verification */
- SSL_CTX_set_verify(socket->ssl_ctx, SSL_VERIFY_PEER, 0);
- } /* Mutual authentication */
- } /* Client */
-
- /* SSL object. */
- if(!(socket->ssl = SSL_new(socket->ssl_ctx))){
- TSK_DEBUG_ERROR("SSL_new(CTX) failed.");
- return -15;
- }
-
- /* Sets FD */
- if((ret = SSL_set_fd(socket->ssl, socket->fd)) == 0){
- TSK_DEBUG_ERROR("SSL_set_fd(%u) failed.", socket->fd);
- return -16;
- }
-
- return 0;
-#endif
-}
-
-
-
-
-//=================================================================================================
-// TLS socket object definition
-//
-static tsk_object_t* tnet_tls_socket_ctor(tsk_object_t * self, va_list * app)
-{
-#if TNET_HAVE_OPENSSL_H
- static tsk_bool_t __ssl_initialized = tsk_false;
-#endif
- tnet_tls_socket_t *socket = self;
- if(socket){
- int ret;
-
- tsk_safeobj_init(socket);
-
-#if defined(__GNUC__)
- socket->fd = (tnet_fd_t)va_arg(*app, unsigned);
-#else
- socket->fd = va_arg(*app, tnet_fd_t);
-#endif
- socket->tlsfile_ca = tsk_strdup(va_arg(*app, const char *));
- socket->tlsfile_pvk = tsk_strdup(va_arg(*app, const char *));
- socket->tlsfile_pbk = tsk_strdup(va_arg(*app, const char *));
- socket->isClient = va_arg(*app, tsk_bool_t);
-
- /* Mutual authentication requires that the TLS client-side also hold a certificate. */
- if(socket->tlsfile_pvk && socket->tlsfile_pbk && socket->tlsfile_ca){
- socket->mutual_auth = tsk_true;
- }
- else{
- socket->mutual_auth = tsk_false;
- }
-
- /* Initialize SSL: http://www.openssl.org/docs/ssl/SSL_library_init.html */
-#if TNET_HAVE_OPENSSL_H
- if(!__ssl_initialized){
- __ssl_initialized = tsk_true;
- SSL_library_init();
- SSL_load_error_strings();
- }
-#endif
- /* Initialize the socket itself: CTX, method, ... */
- if((ret = tnet_tls_socket_init(socket))){
- TSK_DEBUG_ERROR("Failed to initialize SSL socket [%d].", ret);
- }
- else{
- socket->initialized = tsk_true;
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_tls_socket_dtor(tsk_object_t * self)
-{
- tnet_tls_socket_t *socket = self;
- if(socket){
-
- tsk_safeobj_deinit(socket);
-
- TSK_FREE(socket->tlsdir_cas);
- TSK_FREE(socket->tlsfile_ca);
- TSK_FREE(socket->tlsfile_pvk);
- TSK_FREE(socket->tlsfile_pbk);
- TSK_FREE(socket->password);
-
-#if TNET_HAVE_OPENSSL_H
- if(socket->ssl){
- //SSL_shutdown(socket->ssl);
- SSL_free(socket->ssl);
- }
- if(socket->ssl_ctx){
- SSL_CTX_free(socket->ssl_ctx);
- }
-#endif
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_tls_socket_def_s =
-{
- sizeof(tnet_tls_socket_t),
- tnet_tls_socket_ctor,
- tnet_tls_socket_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_tls_socket_def_t = &tnet_tls_socket_def_s;
-
-
diff --git a/branches/1.0/tinyNET/src/tls/tnet_tls.h b/branches/1.0/tinyNET/src/tls/tnet_tls.h
deleted file mode 100644
index 78305d7..0000000
--- a/branches/1.0/tinyNET/src/tls/tnet_tls.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_tls.h
- * @brief TLS utilitity functions, based on openssl.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TLS_H
-#define TNET_TLS_H
-
-#include "tinynet_config.h"
-
-#include "tnet_types.h"
-
-#include "tsk_object.h"
-
-TNET_BEGIN_DECLS
-
-typedef void tnet_tls_socket_handle_t;
-
-int tnet_tls_socket_isok(const tnet_tls_socket_handle_t* self);
-int tnet_tls_socket_connect(tnet_tls_socket_handle_t* self);
-int tnet_tls_socket_write(tnet_tls_socket_handle_t* self, const void* data, tsk_size_t size);
-#define tnet_tls_socket_send(self, data, size) tnet_tls_socket_write(self, data, size)
-int tnet_tls_socket_recv(tnet_tls_socket_handle_t* self, void** data, tsk_size_t *size, int *isEncrypted);
-
-TINYNET_API tnet_tls_socket_handle_t* tnet_tls_socket_create(tnet_fd_t fd, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk, tsk_bool_t isClient);
-TINYNET_API tnet_tls_socket_handle_t* tnet_tls_socket_client_create(tnet_fd_t fd, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk);
-TINYNET_API tnet_tls_socket_handle_t* tnet_tls_socket_server_create(tnet_fd_t fd, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_tls_socket_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_TLS_H */
diff --git a/branches/1.0/tinyNET/src/tnet.c b/branches/1.0/tinyNET/src/tnet.c
deleted file mode 100644
index 04f4cba..0000000
--- a/branches/1.0/tinyNET/src/tnet.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet.c
- * @brief Network stack.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet.h"
-#include "tnet_utils.h"
-
-#include "tsk_time.h"
-#include "tsk_debug.h"
-
-#include <stdlib.h> /* srand */
-
-/** @mainpage tinyNET API Overview
-*
-* <h1>10 Sockets and Network Functions</h1>
-*
-* All network functions are part of tinyNET projects.<br>
-* You MUST call @ref tnet_startup() before using any network function (tnet_*). tnet_cleanup() is used to terminate use of network functions. <br>
-* The startup function will determine whether the host is a ìlittle-endianî machine or not (at runtime).
-*
-* ======
-*
-* - @ref tnet_socket_group
-* - @ref tnet_utils_group
-* - @ref tnet_dhcp_group
-* - @ref tnet_dhcp6_group
-* - @ref tnet_dns_group
-* - @ref tnet_nat_group (@ref tnet_stun_group, @ref tnet_turn_group, ICE)
-*
-* ======
-*
-*/
-static tsk_bool_t __tnet_started = tsk_false;
-tsk_bool_t tnet_isBigEndian = tsk_false;
-
-/**
- * @fn tnet_startup
- * This is probably the most important function. You MUST call this function to initialize the network stack before calling any <b>tnet_*</b> function.
- * You MUST call @ref tnet_cleanup to cleanup the network stack.
- *
- * @sa @ref tnet_cleanup.
- * @return Zero if succeed and error code otherwise.
-**/
-int tnet_startup()
-{
- int err = 0;
- short word = 0x4321;
-
- if(__tnet_started){
- goto bail;
- }
-
- // rand()
- srand((unsigned int) tsk_time_epoch());
-
- // endianness
- tnet_isBigEndian = ((*(int8_t *)&word) != 0x21);
-#if TNET_UNDER_WINDOWS
- if(tnet_isBigEndian){
- TSK_DEBUG_ERROR("Big endian on Windows machine. Is it right?");
- }
-#endif
-
-#if TNET_UNDER_WINDOWS
- {
- WORD wVersionRequested;
- WSADATA wsaData;
-
- wVersionRequested = MAKEWORD(2, 2);
-
- err = WSAStartup(wVersionRequested, &wsaData);
- if (err != 0) {
- TSK_DEBUG_FATAL("WSAStartup failed with error: %d\n", err);
- return -1;
- }
-
- if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2){
- TSK_DEBUG_FATAL("Could not find a usable version of Winsock.dll\n");
- tnet_cleanup();
- return -2;
- }
- else{
- __tnet_started = tsk_true;
- TSK_DEBUG_INFO("The Winsock 2.2 dll was found okay\n");
- }
- }
-#else
- __tnet_started = tsk_true;
-#endif /* TNET_UNDER_WINDOWS */
-
-bail:
- return err;
-}
-
-
-/**
- * Cleanup the network stack.
- *
- * @sa @ref tnet_startup.
- * @retval Zero if succeed and non-zero error code otherwise.
-**/
-int tnet_cleanup()
-{
- if(!__tnet_started){
- goto bail;
- }
-
-#if TNET_UNDER_WINDOWS
- __tnet_started = tsk_false;
- return WSACleanup();
-#else
- __tnet_started = tsk_false;
-#endif
-
-bail:
- return 0;
-}
-
diff --git a/branches/1.0/tinyNET/src/tnet.h b/branches/1.0/tinyNET/src/tnet.h
deleted file mode 100644
index a2b832a..0000000
--- a/branches/1.0/tinyNET/src/tnet.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet.h
- * @brief Network stack.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TNET_H
-#define TNET_TNET_H
-
-#include "tinynet_config.h"
-
-#include "tsk_common.h"
-
-TNET_BEGIN_DECLS
-
-TINYNET_API int tnet_startup();
-TINYNET_API int tnet_cleanup();
-
-TNET_END_DECLS
-
-#endif /* TNET_TNET_H */
-
diff --git a/branches/1.0/tinyNET/src/tnet_auth.c b/branches/1.0/tinyNET/src/tnet_auth.c
deleted file mode 100644
index 178aa6f..0000000
--- a/branches/1.0/tinyNET/src/tnet_auth.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_auth.c
- * @brief HTTP Authentication: Basic and Digest Access Authentication as per RFC 2617.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_auth.h"
diff --git a/branches/1.0/tinyNET/src/tnet_auth.h b/branches/1.0/tinyNET/src/tnet_auth.h
deleted file mode 100644
index 05d4059..0000000
--- a/branches/1.0/tinyNET/src/tnet_auth.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_auth.h
- * @brief HTTP Authentication: Basic and Digest Access Authentication as per RFC 2617.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_AUTH_H
-#define TNET_AUTH_H
-
-#include "tinynet_config.h"
-
-TNET_BEGIN_DECLS
-
-TNET_END_DECLS
-
-#endif /* TNET_AUTH_H */
diff --git a/branches/1.0/tinyNET/src/tnet_endianness.c b/branches/1.0/tinyNET/src/tnet_endianness.c
deleted file mode 100644
index afa61c2..0000000
--- a/branches/1.0/tinyNET/src/tnet_endianness.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_endianness.c
- * @brief Byte Ordering.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_endianness.h"
-
-#include "tnet.h"
-
-extern tsk_bool_t tnet_isBigEndian;
-
-/** Converts a 16-bit value from host to TCP/IP network byte order (big-endian).
-* @param x The 16-bit (in host byte order) value to convert.
-* @retval @a x in TCP/IP network byte order.
-*/
-unsigned short tnet_htons(unsigned short x)
-{
- if(tnet_is_BE()){
- return x;
- }
- else{
- return ((((uint16_t)(x) & 0xff00) >> 8) |
- (((uint16_t)(x) & 0x00ff) << 8));
- }
-}
-
-/* Memory alignment hack */
-unsigned short tnet_htons_2(const void* px)
-{
- unsigned short y = TSK_TO_UINT16((const uint8_t*)px);
- return tnet_htons(y);
-}
-
-/** Converts a 32-bit value from host to TCP/IP network byte order (big-endian).
-* @param x The 32-bit (in host byte order) value to convert.
-* @retval @a x in TCP/IP network byte order.
-*/
-unsigned long tnet_htonl(unsigned long x)
-{
- if(tnet_is_BE()){
- return x;
- }
- else{
- return ((((uint32_t)(x) & 0xff000000) >> 24) | \
- (((uint32_t)(x) & 0x00ff0000) >> 8) | \
- (((uint32_t)(x) & 0x0000ff00) << 8) | \
- (((uint32_t)(x) & 0x000000ff) << 24));
- }
-}
-
-/* Memory alignment hack */
-unsigned long tnet_htonl_2(const void* px)
-{
- unsigned long y = TSK_TO_UINT32((const uint8_t*)px);
- return tnet_htonl(y);
-}
-
-/** Indicates whether we are on a Big Endian host or not.<br>
-* <b>IMPORTANT</b>: Before calling this function, you should initialize the network stack by using
-* @ref tnet_startup().
-* @retval @a tsk_true if the program is runnin on a Big Endian host and @a tsk_false otherwise.
-*/
-tsk_bool_t tnet_is_BE(){
- /* If LITTLE_ENDIAN or BIG_ENDIAN macros have been defined in config.h ==> use them
- * otherwise ==> dyn retrieve the endianness
- */
-#if LITTLE_ENDIAN
- return tsk_false;
-#elif BIG_ENDIAN
- return tsk_true;
-#else
- return tnet_isBigEndian;
-#endif
-}
diff --git a/branches/1.0/tinyNET/src/tnet_endianness.h b/branches/1.0/tinyNET/src/tnet_endianness.h
deleted file mode 100644
index cf25729..0000000
--- a/branches/1.0/tinyNET/src/tnet_endianness.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_endianness.h
- * @brief Byte Ordering.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_ENDIANNESS_H
-#define TNET_ENDIANNESS_H
-
-#include "tinynet_config.h"
-
-#include "tsk_common.h" /* tsk_bool_t */
-
-TNET_BEGIN_DECLS
-
-TINYNET_API TNET_INLINE unsigned short tnet_htons(unsigned short x);
-TINYNET_API TNET_INLINE unsigned short tnet_htons_2(const void* px);
-TINYNET_API TNET_INLINE unsigned long tnet_htonl(unsigned long x);
-TINYNET_API TNET_INLINE unsigned long tnet_htonl_2(const void* px);
-TINYNET_API TNET_INLINE tsk_bool_t tnet_is_BE();
-
-#define tnet_ntohs(x) tnet_htons(x)
-#define tnet_ntohs_2(px) tnet_htons_2(px)
-#define tnet_ntohl(x) tnet_htonl(x)
-#define tnet_ntohl_2(px) tnet_htonl_2(px)
-
-TNET_BEGIN_DECLS
-
-#endif /*TNET_ENDIANNESS_H*/
-
diff --git a/branches/1.0/tinyNET/src/tnet_hardwares.h b/branches/1.0/tinyNET/src/tnet_hardwares.h
deleted file mode 100644
index aa3357b..0000000
--- a/branches/1.0/tinyNET/src/tnet_hardwares.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-/**@file tnet_hardwares.h
- * @brief List of Hardware types as assigned by the IANA.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#ifndef TNET_HARDWARES_H
-#define TNET_HARDWARES_H
-
-#include "tinynet_config.h"
-
-TNET_BEGIN_DECLS
-
-/**
-* List of Hardware types as assigned by the IANA.
-* See RFC 1340, 826 and... for more information.
-*/
-typedef enum tnet_hardware_type_e
-{
- tnet_htype_Ethernet_10Mb = 1, /**< Ethernet (10Mb) */
- tnet_htype_Ethernet_3Mb = 2, /**< Experimental Ethernet (3Mb) */
- tnet_htype_AX_25 = 3, /**< Amateur Radio AX.25 */
- tnet_htype_Token_Ring = 4, /**< Proteon ProNET Token Ring */
- tnet_htype_Chaos = 5, /**< Chaos */
- tnet_htype_IEEE_802_Networks = 6, /**< IEEE 802 Networks */
- tnet_htype_ARCNET = 7, /**< ARCNET */
- tnet_htype_Hyperchannel = 8, /**< Hyperchannel */
- tnet_htype_Lanstar = 9, /**< Lanstar */
- tnet_htype_Autonet_Short_Address = 10, /**< Autonet Short Address */
- tnet_htype_ALocalTalk = 11, /**< LocalTalk */
- tnet_htype_LocalNet= 12, /**< LocalNet (IBM PCNet or SYTEK LocalNET) */
- tnet_htype_Ultra_link = 13, /**< Ultra link */
- tnet_htype_SMDS = 14, /**< SMDS */
- tnet_htype_Frame_Relay = 15, /**< Frame Relay */
- tnet_htype_ATM = 16, /**< Asynchronous Transmission Mode (ATM) */
-}
-tnet_hardware_type_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_HARDWARES_H */
diff --git a/branches/1.0/tinyNET/src/tnet_nat.c b/branches/1.0/tinyNET/src/tnet_nat.c
deleted file mode 100644
index cd39b68..0000000
--- a/branches/1.0/tinyNET/src/tnet_nat.c
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_nat.c
- * @brief NAT Traversal helper functions using STUN, TURN and ICE.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_nat.h"
-
-#include "tnet_endianness.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-#include "tsk_debug.h"
-
-/**@defgroup tnet_nat_group NAT Traversal API (STUN, TURN and ICE).
-*/
-
-
-/**@ingroup tnet_nat_group
-* Creates new NAT context.
-*/
-tnet_nat_context_handle_t* tnet_nat_context_create(tnet_socket_type_t socket_type, const char* username, const char* password)
-{
- return tsk_object_new(tnet_nat_context_def_t, socket_type, username, password);
-}
-
-/**
- * Predicate function to find turn allocation by id.
- *
- * @param [in,out] item The current list item.
- * @param [in,out] id A pointer to the allocation identifier.
- *
- * @return Zero if current list item hold an allocation with the same id and -1 otherwise.
-**/
-int __pred_find_turn_allocation(const tsk_list_item_t* item, const void* id)
-{
- if(item)
- {
- tnet_turn_allocation_t *allocation = item->data;
- if(allocation)
- {
- tnet_turn_allocation_id_t alloc_id = *((tnet_turn_allocation_id_t*)id);
- return (allocation->id == alloc_id) ? 0 : -1;
- }
- }
- return -1;
-}
-
-/** Predicate function to find stun binding by id.
- *
- * @param [in,out] item The current list item.
- * @param [in,out] id A pointer to the binding identifier.
- *
- * @return Zero if current list item hold a binding with the same id and -1 otherwise.
-**/
-int __pred_find_stun_binding(const tsk_list_item_t* item, const void* id)
-{
- if(item)
- {
- tnet_stun_binding_t *binding = item->data;
- if(binding)
- {
- tnet_stun_binding_id_t binding_id = *((tnet_stun_binding_id_t*)id);
- return (binding->id == binding_id) ? 0 : -1;
- }
- }
- return -1;
-}
-
-/** Predicate function to find TURN channel binding by id.
- *
- * @param [in,out] item The current list item.
- * @param [in,out] id A pointer to the TURN channel binding identifier.
- *
- * @return Zero if current list item hold a TURN channel binding with the same id and -1 otherwise.
-**/
-int __pred_find_turn_channel_binding(const tsk_list_item_t* item, const void* id)
-{
- if(item)
- {
- tnet_turn_channel_binding_t *binding = item->data;
- if(binding)
- {
- tnet_turn_channel_binding_id_t binding_id = *((tnet_turn_channel_binding_id_t*)id);
- return (binding->id == binding_id) ? 0 : -1;
- }
- }
- return -1;
-}
-
-/**
- * Formats binary IP address as string.
- *
- * @param in_ip The binary IP address to format (in Host byte order).
- * @param family The address family.
- * @param [in,out] out_ip The output string
- *
- * @return Zero if current list item hold a binding with the same id and -1 otherwise.
-**/
-int tnet_stun_address_tostring(const uint8_t in_ip[16], tnet_stun_addr_family_t family, char** out_ip)
-{
- /*if(family == stun_ipv6){
- tsk_sprintf(out_ip, "%x:%x:%x:%x:%x:%x:%x:%x",
- tnet_ntohs_2(&in_ip[0]), tnet_ntohs_2(&in_ip[2]), tnet_ntohs_2(&in_ip[4]), tnet_ntohs_2(&in_ip[6]),
- tnet_ntohs_2(&in_ip[8]), tnet_ntohs_2(&in_ip[10]), tnet_ntohs_2(&in_ip[12]), tnet_ntohs_2(&in_ip[14]));
- }
- else if(family == stun_ipv4){
- tsk_sprintf(out_ip, "%u.%u.%u.%u", (address>>24)&0xFF, (address>>16)&0xFF, (address>>8)&0xFF, (address>>0)&0xFF);
-
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("Unsupported address family: %u.", family);
- }*/
- if(family == stun_ipv6){
- tsk_sprintf(out_ip, "%x:%x:%x:%x:%x:%x:%x:%x",
- TSK_TO_UINT16(&in_ip[0]), TSK_TO_UINT16(&in_ip[2]), TSK_TO_UINT16(&in_ip[4]), TSK_TO_UINT16(&in_ip[6]),
- TSK_TO_UINT16(&in_ip[8]), TSK_TO_UINT16(&in_ip[10]), TSK_TO_UINT16(&in_ip[12]), TSK_TO_UINT16(&in_ip[14]));
- }
- else if(family == stun_ipv4){
- tsk_sprintf(out_ip, "%u.%u.%u.%u", in_ip[0], in_ip[1], in_ip[2], in_ip[3]);
-
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("Unsupported address family: %u.", family);
- }
-
- return -1;
-}
-
-
-/**@ingroup tnet_nat_group
- *
- * Sets the address of the STUN/TURN server.
- *
- * @param [in,out] self The NAT context.
- * @param [in,out] server_address The address of server.
- *
- * @return Zero if succeed and non zero error code otherwise.
-**/
-int tnet_nat_set_server_address(tnet_nat_context_handle_t* self, const char* server_address)
-{
- tnet_nat_context_t* context = self;
-
- if(context){
- tsk_strupdate(&(context->server_address), server_address);
- return 0;
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
- *
- * Sets the address and port of the STUN/TURN server.
- *
- * @param [in,out] self The NAT context.
- * @param [in,out] server_address The address of server.
- * @param server_port The server port.
- *
- * @return Zero if succeed and non zero error code otherwise.
-**/
-int tnet_nat_set_server(tnet_nat_context_handle_t* self, const char* server_address, tnet_port_t server_port)
-{
- tnet_nat_context_t* context = self;
-
- if(context){
- tsk_strupdate(&(context->server_address), server_address);
- context->server_port = server_port;
-
- return 0;
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
- *
- * Creates and sends a STUN2 binding request to the STUN/TURN server in order to get the server reflexive
- * address associated to this file descriptor (or socket). The caller should call @ref tnet_nat_stun_unbind to destroy the binding.
- *
- * @param [in,out] self The NAT context.
- * @param localFD The local file descriptor (or socket) for which to get the reflexive server address.
- *
- * @return A valid binding id if succeed and @ref TNET_STUN_INVALID_BINDING_ID otherwise. If the returned id is valid then
- * the newly created binding will contain the server-reflexive address associated to the local file descriptor.
- *
- * @sa @ref tnet_nat_stun_unbind.
-**/
-tnet_stun_binding_id_t tnet_nat_stun_bind(const tnet_nat_context_handle_t* self, const tnet_fd_t localFD)
-{
- const tnet_nat_context_t* context = self;
- if(context){
- return tnet_stun_bind(context, localFD);
- }
- return TNET_STUN_INVALID_BINDING_ID;
-}
-
-/**@ingroup tnet_nat_group
- * Gets the server reflexive address associated to this STUN2 binding.
- *
- *
- * @param [in,out] self The NAT context.
- * @param id The id of the STUN2 binding conetxt (obtained using @ref tnet_nat_stun_bind) holding the server-reflexive address.
- * @param [in,out] ipaddress The reflexive IP address. It is up the the caller to free the returned string
- * @param [in,out] port The reflexive port.
- *
- * @return Zero if succeed and non zero error code otherwise.
-**/
-int tnet_nat_stun_get_reflexive_address(const tnet_nat_context_handle_t* self, tnet_stun_binding_id_t id, char** ipaddress, tnet_port_t *port)
-{
- const tnet_nat_context_t* context = self;
- if(context){
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(context->stun_bindings, __pred_find_stun_binding, &id);
- if(item && item->data){
- tnet_stun_binding_t *binding = item->data;
- /*STUN2: XOR-MAPPED-ADDRESS */
- if(binding->xmaddr){
- int ret = 0;
- if(ipaddress){
- ret = tnet_stun_address_tostring(binding->xmaddr->xaddress, binding->xmaddr->family, ipaddress);
- }
- if(port){
- *port = /*tnet_ntohs*/(binding->xmaddr->xport);
- }
- return ret;
- }
-
- /*STUN1: MAPPED-ADDRESS*/
- if(binding->maddr){
- int ret = 0;
- if(ipaddress){
- ret = tnet_stun_address_tostring(binding->maddr->address, binding->maddr->family, ipaddress);
- }
- if(port){
- *port = /*tnet_ntohs*/(binding->maddr->port);
- }
- return ret;
- }
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
- *
- * Removes a STUN2 binding from the NAT context.
- *
- * @param [in,out] self The NAT context from which to remove the STUN2 binding.
- * @param id The id of the STUN2 binding to remove.
- *
- * @return Zero if succeed and non zero error code otherwise.
- *
- *
- * @sa @ref tnet_nat_stun_bind.
-**/
-int tnet_nat_stun_unbind(const tnet_nat_context_handle_t* self, tnet_stun_binding_id_t id)
-{
- const tnet_nat_context_t* context = self;
- if(context)
- {
- tsk_list_remove_item_by_pred(context->stun_bindings, __pred_find_stun_binding, &id);
- return 0;
- }
- return -1;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/**@ingroup tnet_nat_group
- *
- * Creates TURN allocation as per draft-ietf-behave-turn-16 subclause 6. This function will also
- * send an allocation request to the server (subclause 6.1).
- *
- * @param [in,out] self The NAT context.
- * @param localFD The local file descriptor.
- *
- * @return A valid TURN allocation id if succeed and @ref TNET_TURN_INVALID_ALLOCATION_ID otherwise.
- *
- * @sa @ref tnet_nat_turn_unallocate.
-**/
-tnet_turn_allocation_id_t tnet_nat_turn_allocate(const tnet_nat_context_handle_t* self, const tnet_fd_t localFD)
-{
- const tnet_nat_context_t* context = self;
-
- if(self)
- {
- return tnet_turn_allocate(self, localFD, context->socket_type);
- }
-
- return TNET_TURN_INVALID_ALLOCATION_ID;
-}
-
-/**@ingroup tnet_nat_group
- * Gets the STUN server-refelexive IP address and port associated to this TURN allocation.
- *
- * @param [in,out] self The NAT context.
- * @param id The id of the TURN allocation for which to to get server-reflexive IP address and port.
- * @param [in,out] ipaddress The server-reflexive IP address.
- * @param [in,out] port The server-reflexive port.
- *
- * @return Zero if succeed and non zero error code otherwise.
-**/
-int tnet_nat_turn_get_reflexive_address(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id, char** ipaddress, tnet_port_t *port)
-{
- const tnet_nat_context_t* context = self;
- if(context)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(context->allocations, __pred_find_turn_allocation, &id);
- if(item && item->data)
- {
- tnet_turn_allocation_t *allocation = item->data;
- /*STUN2: XOR-MAPPED-ADDRESS */
- if(allocation->xmaddr)
- {
- int ret = tnet_stun_address_tostring(allocation->xmaddr->xaddress, allocation->xmaddr->family, ipaddress);
- *port = /*tnet_ntohs*/(allocation->xmaddr->xport);
- return ret;
- }
-
- /*STUN1: MAPPED-ADDRESS*/
- if(allocation->maddr)
- {
- int ret = tnet_stun_address_tostring(allocation->maddr->address, allocation->maddr->family, ipaddress);
- *port = /*tnet_ntohs*/(allocation->maddr->port);
- return ret;
- }
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
- *
- * Refresh a TURN allocation previously created using @ref tnet_nat_turn_allocate.
- *
- * @param [in,out] self The NAT context.
- * @param id The id of the TURN allocation to refresh.
- *
- * @return Zero if succeed and non zero error code otherwise.
-**/
-int tnet_nat_turn_allocation_refresh(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id)
-{
- const tnet_nat_context_t* context = self;
-
- if(context)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(context->allocations, __pred_find_turn_allocation, &id);
- if(item && item->data)
- {
- tnet_turn_allocation_t *allocation = item->data;
- return tnet_turn_allocation_refresh(self, allocation);
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
- *
- * Unallocate/remove a TURN allocation from the server.
- *
- * @param [in,out] self The NAT context from which to remove the allocation.
- * @param id The id of the TURN allocation to remove.
- *
- * @return Zero if succeed and non zero error code otherwise.
- *
- * @sa @ref tnet_nat_turn_allocate.
-**/
-int tnet_nat_turn_unallocate(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id)
-{
- const tnet_nat_context_t* context = self;
-
- if(context)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(context->allocations, __pred_find_turn_allocation, &id);
- if(item && item->data)
- {
- tnet_turn_allocation_t *allocation = item->data;
- return tnet_turn_unallocate(self, allocation);
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
- * Creates TURN channel binding as per draft-ietf-behave-turn-16 sublause 11 and send it to the
- * server as per subclause 11.1.
- *
- *
- * @param [in,out] self The NAT context.
- * @param id The id of the TURN allocation associated to this binding.
- * @param [in,out] peer The XOR remote peer for the channel binding.
- *
- * @return A valid TURN channel binding id if succeed and @ref TNET_TURN_INVALID_CHANNEL_BINDING_ID otherwise.
-**/
-tnet_turn_channel_binding_id_t tnet_nat_turn_channel_bind(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id, struct sockaddr_storage *peer)
-{
- const tnet_nat_context_t* context = self;
-
- if(context)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(context->allocations, __pred_find_turn_allocation, &id);
- if(item && item->data)
- {
- tnet_turn_allocation_t *allocation = item->data;
- return tnet_turn_channel_bind(self, allocation, peer);
- }
- }
- return TNET_TURN_INVALID_CHANNEL_BINDING_ID;
-}
-
-/**@ingroup tnet_nat_group
-*/
-int tnet_nat_turn_channel_refresh(const tnet_nat_context_handle_t* self, tnet_turn_channel_binding_id_t id)
-{
- const tnet_nat_context_t* context = self;
-
- if(context)
- {
- tsk_list_item_t* curr;
- tsk_list_foreach(curr, context->allocations)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(((tnet_turn_allocation_t *)curr->data)->channel_bindings, __pred_find_turn_channel_binding, &id);
- if(item && item->data)
- {
- return tnet_turn_channel_refresh(context, (tnet_turn_channel_binding_t *)item->data);
- }
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
-*/
-int tnet_nat_turn_channel_send(const tnet_nat_context_handle_t* self, tnet_turn_channel_binding_id_t id, const void* data, tsk_size_t size, int indication)
-{
- const tnet_nat_context_t* context = self;
-
- if(context && data && size)
- {
- tsk_list_item_t* curr;
- tsk_list_foreach(curr, context->allocations)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(((tnet_turn_allocation_t *)curr->data)->channel_bindings, __pred_find_turn_channel_binding, &id);
- if(item && item->data)
- {
- return tnet_turn_channel_senddata(context, (tnet_turn_channel_binding_t *)item->data, data, size, indication);
- }
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_nat_group
-*/
-int tnet_nat_turn_add_permission(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id, const char* ipaddress, uint32_t timeout)
-{
- const tnet_nat_context_t* context = self;
-
- if(self)
- {
- const tsk_list_item_t* item = tsk_list_find_item_by_pred(context->allocations, __pred_find_turn_allocation, &id);
- if(item && item->data)
- {
- tnet_turn_allocation_t *allocation = item->data;
- return tnet_turn_add_permission(self, allocation, ipaddress, timeout);
- }
- }
- return -1;
-}
-
-
-//=================================================================================================
-// NAT CONTEXT object definition
-//
-static tsk_object_t* tnet_nat_context_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_nat_context_t *context = self;
- if(context){
- context->socket_type = va_arg(*app, tnet_socket_type_t);
-
- context->username = tsk_strdup(va_arg(*app, const char*));
- context->password = tsk_strdup(va_arg(*app, const char*));
-
- context->server_port = TNET_NAT_TCP_UDP_DEFAULT_PORT;
-
- /* 7.2.1. Sending over UDP
- In fixed-line access links, a value of 500 ms is RECOMMENDED.
- */
- context->RTO = TNET_NAT_DEFAULT_RTO;
-
- /* 7.2.1. Sending over UDP
- Rc SHOULD be configurable and SHOULD have a default of 7.
- */
- context->Rc = TNET_NAT_DEFAULT_RC;
-
- context->software = tsk_strdup(TNET_SOFTWARE);
- //context->enable_evenport = 1;
- //context->enable_fingerprint = 1;
- context->enable_integrity = 0;
- context->enable_dontfrag = 0;//TNET_SOCKET_TYPE_IS_DGRAM(context->socket_type) ? 1 : 0;
-
- context->allocations = tsk_list_create();
- context->stun_bindings = tsk_list_create();
- }
- return self;
-}
-
-static tsk_object_t* tnet_nat_context_dtor(tsk_object_t * self)
-{
- tnet_nat_context_t *context = self;
- if(context){
- TSK_FREE(context->username);
- TSK_FREE(context->password);
- TSK_FREE(context->software);
- TSK_FREE(context->server_address);
-
- TSK_OBJECT_SAFE_FREE(context->allocations);
- TSK_OBJECT_SAFE_FREE(context->stun_bindings);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_nat_context_def_s =
-{
- sizeof(tnet_nat_context_t),
- tnet_nat_context_ctor,
- tnet_nat_context_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_nat_context_def_t = &tnet_nat_context_def_s;
diff --git a/branches/1.0/tinyNET/src/tnet_nat.h b/branches/1.0/tinyNET/src/tnet_nat.h
deleted file mode 100644
index 023f2d5..0000000
--- a/branches/1.0/tinyNET/src/tnet_nat.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_nat.h
- * @brief NAT Traversal helper functions using STUN, TURN and ICE.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_NAT_H
-#define TNET_NAT_H
-
-#include "tinynet_config.h"
-
-#include "stun/tnet_stun.h"
-#include "turn/tnet_turn.h"
-
-#include "tnet_proto.h"
-#include "tnet_types.h"
-
-#include "tsk_object.h"
-
-
-TNET_BEGIN_DECLS
-
-/**@ingroup tnet_nat_group
-* Estimate of the round-trip time (RTT) in millisecond.
-*/
-#define TNET_NAT_DEFAULT_RTO 500
-/**@ingroup tnet_nat_group
-* Number of retransmission for UDP retransmission in millisecond.
-/* 7.2.1. Sending over UDP
- Rc SHOULD be configurable and SHOULD have a default of 7.
-*/
-#define TNET_NAT_DEFAULT_RC /*7*/3/* 7 is too hight */
-/**@ingroup tnet_nat_group
-*/
-#define TNET_NAT_TCP_UDP_DEFAULT_PORT 3478
-
-/**@ingroup tnet_nat_group
- * NAT context.
-**/
-typedef struct tnet_nat_context_s
-{
- TSK_DECLARE_OBJECT;
-
- //tnet_fd_t localFD; /**< Local file descriptor. */
- tnet_socket_type_t socket_type;
-
- char* username; /**< The username to use to authenticate against the TURN/STUN server. */
- char* password; /**< The password to use to authenticate against the TURN/STUN server. */
- char* software; /**< The turn/stun client name. */
-
- char* server_address; /**< TURN/STUN server address (could be FQDN or IP) */
- tnet_port_t server_port; /**< TURN/STUN server port. */
-
- uint16_t RTO; /**< Estimate of the round-trip time (RTT) in millisecond. */
- uint16_t Rc; /**< Number of retransmissions for UDP in millisecond. */
-
- unsigned enable_dontfrag:1;
- unsigned enable_integrity:1;
- unsigned enable_evenport:1;
- unsigned enable_fingerprint:1; /**< Indicates whether to add the 'fingerprint' attribute in all outgoing stun/turn requests. */
- unsigned use_dnsquery:1; /**< Indicates whether to use DNS SRV query to find the stun/turn ip address. */
-
- tnet_turn_allocations_L_t *allocations; /**< List of all allocations associated to this context. */
- tnet_stun_bindings_L_t *stun_bindings; /**< List of all STUN2 bindings associated to this context. */
-}
-tnet_nat_context_t;
-
-/**@ingroup tnet_nat_group
- * Handle to the NAT context(@ref tnet_nat_context_t).
-**/
-typedef void tnet_nat_context_handle_t;
-
-TINYNET_API int tnet_nat_set_server_address(tnet_nat_context_handle_t* self, const char* server_address);
-TINYNET_API int tnet_nat_set_server(tnet_nat_context_handle_t* self, const char* server_address, tnet_port_t server_port);
-
-TINYNET_API tnet_stun_binding_id_t tnet_nat_stun_bind(const tnet_nat_context_handle_t* self, const tnet_fd_t localFD);
-TINYNET_API int tnet_nat_stun_get_reflexive_address(const tnet_nat_context_handle_t* self, tnet_stun_binding_id_t id, char** ipaddress, tnet_port_t *port);
-TINYNET_API int tnet_nat_stun_unbind(const tnet_nat_context_handle_t* self, tnet_stun_binding_id_t id);
-
-TINYNET_API tnet_turn_allocation_id_t tnet_nat_turn_allocate(const tnet_nat_context_handle_t* self, const tnet_fd_t localFD);
-TINYNET_API int tnet_nat_turn_get_reflexive_address(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id, char** ipaddress, tnet_port_t *port);
-TINYNET_API int tnet_nat_turn_allocation_refresh(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id);
-TINYNET_API int tnet_nat_turn_unallocate(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id);
-TINYNET_API tnet_turn_channel_binding_id_t tnet_nat_turn_channel_bind(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id, struct sockaddr_storage *peer);
-TINYNET_API int tnet_nat_turn_channel_refresh(const tnet_nat_context_handle_t* self, tnet_turn_channel_binding_id_t id);
-TINYNET_API int tnet_nat_turn_channel_send(const tnet_nat_context_handle_t* self, tnet_turn_channel_binding_id_t id, const void* data, tsk_size_t size, int indication);
-#define tnet_nat_turn_channel_sendindication(context, channel_id, data, size) tnet_nat_turn_channel_send(context, channel_id, data, size, 1)
-#define tnet_nat_turn_channel_senddata(context, channel_id, data, size) tnet_nat_turn_channel_send(context, channel_id, data, size, 0)
-TINYNET_API int tnet_nat_turn_add_permission(const tnet_nat_context_handle_t* self, tnet_turn_allocation_id_t id, const char* ipaddress, uint32_t timeout);
-
-TINYNET_API tnet_nat_context_handle_t* tnet_nat_context_create(tnet_socket_type_t socket_type, const char* username, const char* password);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_nat_context_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_NAT_H */
diff --git a/branches/1.0/tinyNET/src/tnet_poll.c b/branches/1.0/tinyNET/src/tnet_poll.c
deleted file mode 100644
index 68a6589..0000000
--- a/branches/1.0/tinyNET/src/tnet_poll.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-#include "tnet_poll.h"
-
-#if TNET_USE_POLL && !TNET_HAVE_POLL
-
-/**
- *
- * @brief poll() method implementation for multiplexing network sockets.
- *
- * @param fds An array of pollfd structures.
- * @param nfds The number of file descriptors set in fds[ ].
- * @param timeout How long poll() should wait for an event to occur (in milliseconds).
- *
- * @return The number of elements in fdarray for which an revents member of the POLLFD structure is nonzero.
- * If the the returned value if <0 this mean that error occurred.
-**/
-
-int tnet_poll(tnet_pollfd_t fds[ ], tnet_nfds_t nfds, int timeout)
-{
- tsk_size_t i;
- int ret;
- int highest_fd = -1;
-
- fd_set readfds;
- fd_set writefds;
- fd_set exceptfds;
- struct timeval timetowait;
-
- /*
- * cleanup fd_sets
- */
- FD_ZERO(&readfds);
- FD_ZERO(&writefds);
- FD_ZERO(&exceptfds);
-
- /*
- * set timeout
- */
- if(timeout >=0){
- timetowait.tv_sec = (timeout/1000);
- timetowait.tv_usec = (timeout%1000) * 1000;
- }
-
- /*
- * add descriptors to the fd_sets
- */
- for(i = 0; i<nfds; i++){
- if(fds[i].fd != TNET_INVALID_FD){
- if(fds[i].events & TNET_POLLIN){
- FD_SET(fds[i].fd, &readfds);
- }
- if(fds[i].events & TNET_POLLOUT){
- FD_SET(fds[i].fd, &writefds);
- }
- if(fds[i].events & TNET_POLLPRI){
- FD_SET(fds[i].fd, &exceptfds);
- }
- }
-
- highest_fd = (highest_fd < fds[i].fd) ? fds[i].fd : highest_fd;
- }
-
- /*======================================
- * select
- */
- if((ret = select(highest_fd + 1, &readfds, &writefds, &exceptfds, (timeout >=0) ? &timetowait : 0)) >= 0){
- for(i = 0; i<nfds; i++){
- if(fds[i].fd != TNET_INVALID_FD){
- fds[i].revents = 0;
-
- if(FD_ISSET(fds[i].fd, &readfds)){
- fds[i].revents |= TNET_POLLIN;
- }
- if(FD_ISSET(fds[i].fd, &writefds)){
- fds[i].revents |= TNET_POLLOUT;
- }
- if(FD_ISSET(fds[i].fd, &exceptfds)){
- fds[i].revents |= TNET_POLLPRI;
- }
- }
- }
- }
-
- return ret;
-}
-
-#endif /* TNET_USE_POLL */
-
-
diff --git a/branches/1.0/tinyNET/src/tnet_poll.h b/branches/1.0/tinyNET/src/tnet_poll.h
deleted file mode 100644
index a8845e0..0000000
--- a/branches/1.0/tinyNET/src/tnet_poll.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_poll.h
- * @brief poll() method implementation for multiplexing network sockets.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_POLL_H
-#define TNET_POLL_H
-
-#include "tinynet_config.h"
-
-TNET_BEGIN_DECLS
-
-#if TNET_USE_POLL
-
-#include "tnet_types.h"
-
-typedef unsigned long tnet_nfds_t;
-
-#if TNET_HAVE_POLL
-
-typedef struct pollfd tnet_pollfd_t;
-
-#define TNET_POLLRDNORM POLLRDNORM
-#define TNET_POLLRDBAND POLLRDBAND
-#define TNET_POLLIN POLLIN
-#define TNET_POLLPRI POLLPRI
-
-#define TNET_POLLWRNORM POLLWRNORM
-#define TNET_POLLOUT POLLOUT
-#define TNET_POLLWRBAND POLLWRBAND
-
-#define TNET_POLLERR POLLERR
-#define TNET_POLLHUP POLLHUP
-#define TNET_POLLNVAL POLLNVAL
-
-#if TNET_UNDER_WINDOWS
-# define tnet_poll WSAPoll
-#else
-# define tnet_poll poll
-#endif /* TNET_UNDER_WINDOWS */
-
-#else
-
-typedef struct tnet_pollfd_s
-{
- tnet_fd_t fd;
- short events;
- short revents;
-}
-tnet_pollfd_t;
-
-#define TNET_POLLIN 0x0001 /* There is data to read */
-#define TNET_POLLPRI 0x0002 /* There is urgent data to read */
-#define TNET_POLLOUT 0x0004 /* Writing now will not block */
-#define TNET_POLLERR 0x0008 /* Error condition */
-#define TNET_POLLHUP 0x0010 /* Hung up */
-#define TNET_POLLNVAL 0x0020 /* Invalid request: fd not open */
-
-int tnet_poll(tnet_pollfd_t fds[ ], tnet_nfds_t nfds, int timeout);
-
-#endif /* TNET_HAVE_POLL */
-
-#endif /* TNET_USE_POLL */
-
-TNET_END_DECLS
-
-#endif /* TNET_POLL_H */
-
diff --git a/branches/1.0/tinyNET/src/tnet_proto.h b/branches/1.0/tinyNET/src/tnet_proto.h
deleted file mode 100644
index f1fefbe..0000000
--- a/branches/1.0/tinyNET/src/tnet_proto.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_proto.h
- * @brief List of all assigned protocols as defined by the IANA (http://www.iana.org/assignments/protocol-numbers/).
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_PROTO_H
-#define TNET_PROTO_H
-
-#include "tinynet_config.h"
-
-TNET_BEGIN_DECLS
-
-/**
- * @enum tnet_proto_e
- *
- * @brief List of all assigned protocols as defined by the IANA
- (http://www.iana.org/assignments/protocol-numbers/).
-**/
-typedef enum tnet_proto_e
-{
- TNET_PROTO_HOPOPT = 0, /**< HOPOPT IPv6 Hop-by-Hop Option [RFC1883] */
- TNET_PROTO_ICMP = 1, /**< ICMP Internet Control Message [RFC792] */
- TNET_PROTO_IGMP = 2, /**< IGMP Internet Group Management [RFC1112] */
- TNET_PROTO_GGP = 3, /**< GGP Gateway-to-Gateway [RFC823] */
- TNET_PROTO_IP = 4, /**< IP IP in IP (encapsulation) [RFC2003] */
- TNET_PROTO_ST = 5, /**< ST Stream [RFC1190][RFC1819] */
- TNET_PROTO_TCP = 6, /**< TCP Transmission Control [RFC793] */
- TNET_PROTO_CBT = 7, /**< CBT CBT [Ballardie] */
- TNET_PROTO_EGP = 8, /**< EGP Exterior Gateway Protocol [RFC888][DLM1] */
- TNET_PROTO_IGP = 9, /**< IGP any private interior gateway [IANA](used by Cisco for their IGRP) */
- TNET_PROTO_BBN_RCC_MON = 10, /**< BBN-RCC-MON BBN RCC Monitoring [SGC] */
- TNET_PROTO_NVP_II = 11, /**< NVP-II Network Voice Protocol [RFC741][SC3] */
- TNET_PROTO_PUP = 12, /**< PUP PUP [PUP][XEROX] */
- TNET_PROTO_ARGUS = 13, /**< ARGUS ARGUS [RWS4] */
- TNET_PROTO_EMCON = 14, /**< EMCON EMCON [BN7] */
- TNET_PROTO_XNET = 15, /**< XNET Cross Net Debugger [IEN158][JFH2] */
- TNET_PROTO_CHAOS = 16, /**< CHAOS Chaos [NC3] */
- TNET_PROTO_UDP = 17, /**< UDP User Datagram [RFC768][JBP] */
- TNET_PROTO_MUX = 18, /**< MUX Multiplexing [IEN90][JBP] */
- TNET_PROTO_DCN_MEAS = 19, /**< DCN-MEAS DCN Measurement Subsystems [DLM1] */
- TNET_PROTO_HMP = 20, /**< HMP Host Monitoring [RFC869][RH6] */
- TNET_PROTO_PRM = 21, /**< PRM Packet Radio Measurement [ZSU] */
- TNET_PROTO_XNS_IDP = 22, /**< XNS-IDP XEROX NS IDP [ETHERNET][XEROX] */
- TNET_PROTO_TRUNK_1 = 23, /**< TRUNK-1 Trunk-1 [BWB6] */
- TNET_PROTO_TRUNK_2 = 24, /**< TRUNK-2 Trunk-2 [BWB6] */
- TNET_PROTO_LEAF_1 = 25, /**< LEAF-1 Leaf-1 [BWB6] */
- TNET_PROTO_LEAF_2 = 26, /**< LEAF-2 Leaf-2 [BWB6] */
- TNET_PROTO_RDP = 27, /**< RDP Reliable Data Protocol [RFC908][RH6] */
- TNET_PROTO_IRTP = 28, /**< IRTP Internet Reliable Transaction [RFC938][TXM] */
- TNET_PROTO_ISO_TP4 = 29, /**< ISO-TP4 ISO Transport Protocol Class 4 [RFC905][RC77] */
- TNET_PROTO_NETBLT = 30, /**< NETBLT Bulk Data Transfer Protocol [RFC969][DDC1] */
- TNET_PROTO_MFE_NSP = 31, /**< MFE-NSP MFE Network Services Protocol [MFENET][BCH2] */
- TNET_PROTO_MERIT_INP = 32, /**< MERIT-INP MERIT Internodal Protocol [HWB] */
- TNET_PROTO_DCCP = 33, /**< DCCP Datagram Congestion Control Protocol [RFC4340] */
- TNET_PROTO_3PC = 34, /**< 3PC Third Party Connect Protocol [SAF3] */
- TNET_PROTO_IDPR = 35, /**< IDPR Inter-Domain Policy Routing Protocol [MXS1] */
- TNET_PROTO_XTP = 36, /**< XTP XTP [GXC] */
- TNET_PROTO_DDP = 37, /**< DDP Datagram Delivery Protocol [WXC] */
- TNET_PROTO_IDPR_CMTP = 38, /**< IDPR-CMTP IDPR Control Message Transport Proto [MXS1] */
- TNET_PROTO_TP_PP = 39, /**< TP++ TP++ Transport Protocol [DXF] */
- TNET_PROTO_IL = 40, /**< IL IL Transport Protocol [Presotto] */
- TNET_PROTO_IPv6 = 41, /**< IPv6 Ipv6 [Deering] */
- TNET_PROTO_SDRP = 42, /**< SDRP Source Demand Routing Protocol [DXE1] */
- TNET_PROTO_IPv6_Route = 43, /**< IPv6-Route Routing Header for IPv6 [Deering] */
- TNET_PROTO_IPv6_Frag = 44, /**< IPv6-Frag Fragment Header for IPv6 [Deering] */
- TNET_PROTO_IDRP = 45, /**< IDRP Inter-Domain Routing Protocol [Hares] */
- TNET_PROTO_RSVP = 46, /**< RSVP Reservation Protocol [Braden] */
- TNET_PROTO_GRE = 47, /**< GRE General Routing Encapsulation [Li] */
- TNET_PROTO_DSR = 48, /**< DSR Dynamic Source Routing Protocol [RFC4728] */
- TNET_PROTO_BNA = 49, /**< BNA BNA [Salamon] */
- TNET_PROTO_ESP = 50, /**< ESP Encap Security Payload [RFC4303] */
- TNET_PROTO_AH = 51, /**< AH Authentication Header [RFC4302] */
- TNET_PROTO_I_NLSP = 52, /**< I-NLSP Integrated Net Layer Security TUBA [GLENN] */
- TNET_PROTO_SWIPE = 53, /**< SWIPE IP with Encryption [JI6] */
- TNET_PROTO_NARP = 54, /**< NARP NBMA Address Resolution Protocol [RFC1735] */
- TNET_PROTO_MOBILE = 55, /**< MOBILE IP Mobility [Perkins] */
- TNET_PROTO_TLSP = 56, /**< TLSP Transport Layer Security Protocol [Oberg] using Kryptonet key management */
- TNET_PROTO_SKIP = 57, /**< SKIP SKIP [Markson] */
- TNET_PROTO_IPv6_ICMP = 58, /**< IPv6-ICMP ICMP for IPv6 [RFC1883] */
- TNET_PROTO_IPv6_NoNxt = 59, /**< IPv6-NoNxt No Next Header for IPv6 [RFC1883] */
- TNET_PROTO_IPv6_Opts = 60, /**< IPv6-Opts Destination Options for IPv6 [RFC1883] */
- TNET_PROTO_ANY_INTERNAL = 61, /**< any host internal protocol [IANA] */
- TNET_PROTO_CFTP = 62, /**< CFTP CFTP [CFTP][HCF2] */
- TNET_PROTO_ANY_LOCAL = 63, /**< any local network [IANA] */
- TNET_PROTO_SAT_EXPAK = 64, /**< SAT-EXPAK SATNET and Backroom EXPAK [SHB] */
- TNET_PROTO_KRYPTOLAN = 65, /**< KRYPTOLAN Kryptolan [PXL1] */
- TNET_PROTO_RVD = 66, /**< RVD MIT Remote Virtual Disk Protocol [MBG] */
- TNET_PROTO_IPPC = 67, /**< IPPC Internet Pluribus Packet Core [SHB] */
- TNET_PROTO_ANY_DISTRIBUTED = 68, /**< any distributed file system [IANA] */
- TNET_PROTO_SAT_MON = 69, /**< SAT-MON SATNET Monitoring [SHB] */
- TNET_PROTO_VISA = 70, /**< VISA VISA Protocol [GXT1] */
- TNET_PROTO_IPCV = 71, /**< IPCV Internet Packet Core Utility [SHB] */
- TNET_PROTO_CPNX = 72, /**< CPNX Computer Protocol Network Executive [DXM2] */
- TNET_PROTO_CPHB = 73, /**< CPHB Computer Protocol Heart Beat [DXM2] */
- TNET_PROTO_WSN = 74, /**< WSN Wang Span Network [VXD] */
- TNET_PROTO_PVP = 75, /**< PVP Packet Video Protocol [SC3] */
- TNET_PROTO_BR_SAT_MON = 76, /**< BR-SAT-MON Backroom SATNET Monitoring [SHB] */
- TNET_PROTO_SUN_ND = 77, /**< SUN-ND SUN ND PROTOCOL-Temporary [WM3] */
- TNET_PROTO_WB_MON = 78, /**< WB-MON WIDEBAND Monitoring [SHB] */
- TNET_PROTO_WB_EXPAK = 79, /**< WB-EXPAK WIDEBAND EXPAK [SHB] */
- TNET_PROTO_ISO_IP = 80, /**< ISO-IP ISO Internet Protocol [MTR] */
- TNET_PROTO_VMTP = 81, /**< VMTP VMTP [DRC3] */
- TNET_PROTO_SECURE_VMTP = 82, /**< SECURE-VMTP SECURE-VMTP [DRC3] */
- TNET_PROTO_VINES = 83, /**< VINES VINES [BXH] */
- TNET_PROTO_TTP = 84, /**< TTP TTP [JXS] */
- TNET_PROTO_NSFNET_IGP = 85, /**< NSFNET-IGP NSFNET-IGP [HWB] */
- TNET_PROTO_DGP = 86, /**< DGP Dissimilar Gateway Protocol [DGP][ML109] */
- TNET_PROTO_TCF = 87, /**< TCF TCF [GAL5] */
- TNET_PROTO_EIGRP = 88, /**< EIGRP EIGRP [CISCO][GXS] */
- TNET_PROTO_OSPFIGP = 89, /**< OSPFIGP OSPFIGP [RFC1583][JTM4] */
- TNET_PROTO_Sprite_RPC = 90, /**< Sprite-RPC Sprite RPC Protocol [SPRITE][BXW] */
- TNET_PROTO_LARP = 91, /**< LARP Locus Address Resolution Protocol [BXH] */
- TNET_PROTO_MTP = 92, /**< MTP Multicast Transport Protocol [SXA] */
- TNET_PROTO_AX25 = 93, /**< AX.25 AX.25 Frames [BK29] */
- TNET_PROTO_IPIP = 94, /**< IPIP IP-within-IP Encapsulation Protocol [JI6] */
- TNET_PROTO_MICP = 95, /**< MICP Mobile Internetworking Control Pro. [JI6] */
- TNET_PROTO_SCC_SP = 96, /**< SCC-SP Semaphore Communications Sec. Pro. [HXH] */
- TNET_PROTO_ETHERIP = 97, /**< ETHERIP Ethernet-within-IP Encapsulation [RFC3378] */
- TNET_PROTO_ENCAP = 98, /**< ENCAP Encapsulation Header [RFC1241,RXB3] */
- TNET_PROTO_ANY_PRIV_ENC = 99, /**< any private encryption scheme [IANA] */
- TNET_PROTO_GMTP = 100, /**< GMTP GMTP [RXB5] */
- TNET_PROTO_IFMP = 101, /**< IFMP Ipsilon Flow Management Protocol [Hinden] */
- TNET_PROTO_PNNI = 102, /**< PNNI PNNI over IP [Callon] */
- TNET_PROTO_PIM = 103, /**< PIM Protocol Independent Multicast [Farinacci] */
- TNET_PROTO_ARIS = 104, /**< ARIS ARIS [Feldman] */
- TNET_PROTO_SCPS = 105, /**< SCPS SCPS [Durst] */
- TNET_PROTO_QNX = 106, /**< QNX QNX [Hunter] */
- TNET_PROTO_AN = 107, /**< A/N Active Networks [Braden] */
- TNET_PROTO_IPComp = 108, /**< IPComp IP Payload Compression Protocol [RFC2393] */
- TNET_PROTO_SNP = 109, /**< SNP Sitara Networks Protocol [Sridhar] */
- TNET_PROTO_Compaq_Peer = 110, /**< Compaq-Peer Compaq Peer Protocol [Volpe] */
- TNET_PROTO_IPX_in_IP = 11, /**< IPX-in-IP IPX in IP [Lee] */
- TNET_PROTO_VRRP = 112, /**< VRRP Virtual Router Redundancy Protocol [RFC3768][RFC-ietf-vrrp-unified-spec-05.txt] */
- TNET_PROTO_PGM = 113, /**< PGM PGM Reliable Transport Protocol [Speakman] */
- TNET_PROTO_ANY_ZERO_HOP = 114, /**< any 0-hop protocol [IANA] */
- TNET_PROTO_L2TP = 115, /**< L2TP Layer Two Tunneling Protocol [Aboba] */
- TNET_PROTO_DDX = 116, /**< DDX D-II Data Exchange (DDX) [Worley] */
- TNET_PROTO_IATP = 117, /**< IATP Interactive Agent Transfer Protocol [Murphy] */
- TNET_PROTO_STP = 118, /**< STP Schedule Transfer Protocol [JMP] */
- TNET_PROTO_SRP = 119, /**< SRP SpectraLink Radio Protocol [Hamilton] */
- TNET_PROTO_UTI = 120, /**< UTI UTI [Lothberg] */
- TNET_PROTO_SMP = 121, /**< SMP Simple Message Protocol [Ekblad] */
- TNET_PROTO_SM = 122, /**< SM SM [Crowcroft] */
- TNET_PROTO_PTP = 123, /**< PTP Performance Transparency Protocol [Welzl] */
- TNET_PROTO_ISIS = 124, /**< ISIS over IPv4 [Przygienda] */
- TNET_PROTO_FIRE = 125, /**< FIRE [Partridge] */
- TNET_PROTO_CRTP = 126, /**< CRTP Combat Radio Transport Protocol [Sautter] */
- TNET_PROTO_CRUDP = 127, /**< CRUDP Combat Radio User Datagram [Sautter] */
- TNET_PROTO_SSCOPMCE = 128, /**< SSCOPMCE [Waber] */
- TNET_PROTO_IPLT = 129, /**< IPLT [Hollbach] */
- TNET_PROTO_SPS = 130, /**< SPS Secure Packet Shield [McIntosh] */
- TNET_PROTO_PIPE = 131, /**< PIPE Private IP Encapsulation within IP [Petri] */
- TNET_PROTO_SCTP = 132, /**< SCTP Stream Control Transmission Protocol [Stewart] */
- TNET_PROTO_FC = 133, /**< FC Fibre Channel [Rajagopal] */
- TNET_PROTO_RSVP_E2E_IGNORE = 134, /**< RSVP-E2E-IGNORE [RFC3175] */
- TNET_PROTO_Mobility_Header = 135, /**< Mobility Header [RFC3775] */
- TNET_PROTO_UDPLite = 136, /**< UDPLite [RFC3828] */
- TNET_PROTO_MPLS_in_IP = 137, /**< MPLS-in-IP [RFC4023] */
- TNET_PROTO_manet = 138, /**< manet MANET Protocols [RFC5498] */
- TNET_PROTO_HIP = 139, /**< HIP Host Identity Protocol [RFC5201] */
- TNET_PROTO_Shim6 = 140, /**< Shim6 Shim6 Protocol [RFC5533] */
- //TNET_PROTO_ = 141-252 Unassigned [IANA]
- TNET_PROTO_EXP1 = 253, /**< Use for experimentation and testing [RFC3692] */
- TNET_PROTO_EXP2 = 254, /**< Use for experimentation and testing [RFC3692] */
- TNET_PROTO_Reserved = 255, /**< Reserved [IANA] */
-
-}
-tnet_proto_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_PROTO_H */
diff --git a/branches/1.0/tinyNET/src/tnet_socket.c b/branches/1.0/tinyNET/src/tnet_socket.c
deleted file mode 100644
index 33dc807..0000000
--- a/branches/1.0/tinyNET/src/tnet_socket.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet.h
- * @brief Protocol agnostic socket.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#include "tnet_socket.h"
-
-#include "tnet_utils.h"
-
-#include "tsk_string.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-/**@defgroup tnet_socket_group Protocol agnostic socket
-*
-*
-* <h2>10.1 Sockets</h2>
-* For performance reason, all sockets created using tinyNET are non-blocking by default.
-* The newly created socket will be automatically bound to associate it with an IP address and port number. @ref tnet_socket_create() function is used to create and bind a
-* non-blocking socket. You should use @ref tnet_socket_create_2() function to control whether the socket should be bound or not. The same function is used to force the stack to create a blocking socket.<br>
-* A socket object is defined like this:<br>
-*
-* @code
-typedef struct tnet_socket_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_socket_type_t type;
- tnet_fd_t fd;
- tnet_ip_t ip;
- uint16_t port;
-
- tnet_tls_socket_handle_t* tlshandle;
-}
-tnet_socket_t;
-* @endcode
-* To create a socket:
-* @code
-// (create udp ipv4 or ipv6 socket)
-tnet_socket_t* socket = tnet_socket_create(
- TNET_SOCKET_HOST_ANY, // local ip address/hostname to bind to
- TNET_SOCKET_PORT_ANY, // local port number to bind to
- tnet_socket_type_udp_ipv46 // the socket type (IPv4 or IPv6)
- );
-// TNET_SOCKET_HOST_ANY --> bind to "0.0.0.0" or "::"
-// TNET_SOCKET_PORT_ANY --> bind to any available port
-* @endcode
-
-* <b>TNET_SOCKET_TYPE_IS_*()</b> macros are used to determine:
-* - The socket type (stream, dgram),
-* - The socket protocol (udp, tcp, tls, sctp, ipsec),
-* - The IP version (ipv6, ipv4),
-* - …
-* <br>
-* A socket is a well-defined object and should be destroyed using @a TSK_DECLARE_SAFE_FREE() macro.
-* A socket will be automatically closed when destroyed.
-*
-*/
-
-/**@ingroup tnet_socket_group
-* Creates a new socket.
-* To check that the returned socket is valid use @ref TNET_SOCKET_IS_VALID function.
-* @param host FQDN (e.g. www.doubango.org) or IPv4/IPv6 IP string.
-* @param port The local/remote port used to receive/send data. Set the port value to @ref TNET_SOCKET_PORT_ANY to bind to a random port.
-* @param type The type of the socket. See @ref tnet_socket_type_t.
-* @param nonblocking Indicates whether to create non-blocking socket.
-* @param bindsocket Indicates whether to bind the newly created socket or not.
-* @retval @ref tnet_socket_t object.
-* @sa @ref tnet_socket_create.
-*/
-tnet_socket_t* tnet_socket_create_2(const char*host, tnet_port_t port, tnet_socket_type_t type, tsk_bool_t nonblocking, tsk_bool_t bindsocket)
-{
- return tsk_object_new(tnet_socket_def_t, host, port, type, nonblocking, bindsocket);
-}
-
-/**@ingroup tnet_socket_group
-* Creates a non-blocking socket and bind it.
-* To check that the returned socket is valid use @ref TNET_SOCKET_IS_VALID function.
-* @param host FQDN (e.g. www.doubango.org) or IPv4/IPv6 IP string.
-* @param port The local/remote port used to receive/send data. Set the port value to @ref TNET_SOCKET_PORT_ANY to bind to a random port.
-* @param type The type of the socket. See @ref tnet_socket_type_t.
-* @retval @ref tnet_socket_t object.
-*/
-tnet_socket_t* tnet_socket_create(const char* host, tnet_port_t port, tnet_socket_type_t type)
-{
- return tnet_socket_create_2(host, port, type, tsk_true, tsk_true);
-}
-
-
-
-
-/**@ingroup tnet_socket_group
- * Closes a socket.
- * @param sock The socket to close.
- * @retval Zero if succeed and nonzero error code otherwise.
-**/
-int tnet_socket_close(tnet_socket_t *sock)
-{
- return tnet_sockfd_close(&(sock->fd));
-}
-
-int tnet_socket_set_tlsfiles(tnet_socket_tls_t* socket, int isClient, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk)
-{
- if(socket){
- return -1;
- }
-
- if(!TNET_SOCKET_TYPE_IS_TLS(socket->type)){
- TSK_DEBUG_ERROR("Not TLS socket.");
- return -2;
- }
-
- if(socket->tlshandle){
- TSK_DEBUG_ERROR("TLS files already set.");
- return -3;
- }
-
- if((socket->tlshandle = tnet_sockfd_set_tlsfiles(socket->fd, isClient, tlsfile_ca, tlsfile_pvk, tlsfile_pbk))){
- return 0;
- }
- else{
- return -4;
- }
-}
-
-//=================================================================================================
-// SOCKET object definition
-//
-static tsk_object_t* tnet_socket_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_socket_t *sock = self;
- if(sock){
- int status;
- tsk_bool_t nonblocking;
- tsk_bool_t bindsocket;
- tsk_istr_t port;
- struct addrinfo *result = 0;
- struct addrinfo *ptr = 0;
- struct addrinfo hints;
- tnet_host_t local_hostname;
-
- const char *host = va_arg(*app, const char*);
-#if defined(__GNUC__)
- sock->port = (tnet_port_t)va_arg(*app, unsigned);
-#else
- sock->port = va_arg(*app, tnet_port_t);
-#endif
- tsk_itoa(sock->port, &port);
- sock->type = va_arg(*app, tnet_socket_type_t);
- nonblocking = va_arg(*app, tsk_bool_t);
- bindsocket = va_arg(*app, tsk_bool_t);
-
- memset(local_hostname, 0, sizeof(local_hostname));
-
- /* Get the local host name */
- if(host != TNET_SOCKET_HOST_ANY && !tsk_strempty(host)){
- memcpy(local_hostname, host, tsk_strlen(host)>sizeof(local_hostname)-1 ? sizeof(local_hostname)-1 : tsk_strlen(host));
- }
- else{
- if(TNET_SOCKET_TYPE_IS_IPV6(sock->type)){
- memcpy(local_hostname, "::", 2);
- }
- else{
- memcpy(local_hostname, "0.0.0.0", 7);
- }
- //if((status = tnet_gethostname(&local_hostname)))
- //{
- // TNET_PRINT_LAST_ERROR("gethostname have failed.");
- // goto bail;
- //}
- }
-
- /* hints address info structure */
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = TNET_SOCKET_TYPE_IS_IPV46(sock->type) ? AF_UNSPEC : (TNET_SOCKET_TYPE_IS_IPV6(sock->type) ? AF_INET6 : AF_INET);
- hints.ai_socktype = TNET_SOCKET_TYPE_IS_STREAM(sock->type) ? SOCK_STREAM : SOCK_DGRAM;
- hints.ai_protocol = TNET_SOCKET_TYPE_IS_STREAM(sock->type) ? IPPROTO_TCP : IPPROTO_UDP;
- hints.ai_flags = AI_PASSIVE
-#if !TNET_UNDER_WINDOWS || _WIN32_WINNT>=0x600
- | AI_ADDRCONFIG
-#endif
- ;
-
- /* Performs getaddrinfo */
- if((status = tnet_getaddrinfo(local_hostname, port, &hints, &result))){
- TNET_PRINT_LAST_ERROR("tnet_getaddrinfo(family=%d, hostname=%s and port=%s) failed: [%s]",
- hints.ai_family, local_hostname, port, tnet_gai_strerror(status));
- goto bail;
- }
-
- /* Find our address. */
- for(ptr = result; ptr; ptr = ptr->ai_next){
- sock->fd = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
- if(ptr->ai_family != AF_INET6 && ptr->ai_family != AF_INET){
- continue;
- }
-
- if(bindsocket){
- /* Bind the socket */
- if((status = bind(sock->fd, ptr->ai_addr, ptr->ai_addrlen))){
- TNET_PRINT_LAST_ERROR("bind have failed.");
- tnet_socket_close(sock);
- continue;
- }
-
- /* Get local IP string. */
- if(status = tnet_get_ip_n_port(sock->fd , &sock->ip, &sock->port)) /* % */
- //if((status = tnet_getnameinfo(ptr->ai_addr, ptr->ai_addrlen, sock->ip, sizeof(sock->ip), 0, 0, NI_NUMERICHOST)))
- {
- TNET_PRINT_LAST_ERROR("Failed to get local IP and port.");
- tnet_socket_close(sock);
- continue;
- }
-// else{
-//#if TNET_UNDER_WINDOWS
-// int index;
-// if((index = tsk_strindexOf(sock->ip, tsk_strlen(sock->ip), "%")) > 0){
-// *(sock->ip + index) = '\0';
-// }
-//#endif
-// }
- }
-
- /* sets the real socket type (if ipv46) */
- if(ptr->ai_family == AF_INET6) {
- TNET_SOCKET_TYPE_SET_IPV6Only(sock->type);
- }
- else{
- TNET_SOCKET_TYPE_SET_IPV4Only(sock->type);
- }
- break;
- }
-
- /* Check socket validity. */
- if(!TNET_SOCKET_IS_VALID(sock)) {
- TNET_PRINT_LAST_ERROR("Invalid socket.");
- goto bail;
- }
-
- /* To avoid "Address already in use" error */
- {
-#if defined(SOLARIS)
- char yes = '1';
-#else
- int yes = 1;
-#endif
- if(setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(int))){
- TNET_PRINT_LAST_ERROR("setsockopt(SO_REUSEADDR) have failed.");
- }
- }
-
- /* Sets the socket to nonblocking mode */
- if(nonblocking){
- if((status = tnet_sockfd_set_nonblocking(sock->fd))){
- goto bail;
- }
- }
-
-bail:
- /* Free addrinfo */
- tnet_freeaddrinfo(result);
-
- /* Close socket if failed. */
- if(status && TNET_SOCKET_IS_VALID(sock)){
- tnet_socket_close(sock);
- }
-
- }
- return self;
-}
-
-static tsk_object_t* tnet_socket_dtor(tsk_object_t * self)
-{
- tnet_socket_t *sock = self;
-
- if(sock){
- /* Close the socket. */
- if(sock->fd > 0){
- tnet_socket_close(sock);
- }
- /* Clean up TLS handle*/
- if(sock->tlshandle){
- TSK_OBJECT_SAFE_FREE(sock->tlshandle);
- }
- }
-
-
- return self;
-}
-
-static const tsk_object_def_t tnet_socket_def_s =
-{
- sizeof(tnet_socket_t),
- tnet_socket_ctor,
- tnet_socket_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_socket_def_t = &tnet_socket_def_s;
-
-
diff --git a/branches/1.0/tinyNET/src/tnet_socket.h b/branches/1.0/tinyNET/src/tnet_socket.h
deleted file mode 100644
index c29c716..0000000
--- a/branches/1.0/tinyNET/src/tnet_socket.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet.h
- * @brief Protocol agnostic socket.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_SOCKET_H
-#define TNET_SOCKET_H
-
-#include "tinynet_config.h"
-#include "tnet_types.h"
-#include "tls/tnet_tls.h"
-
-#include "tsk_list.h"
-
-/** List of all supported socket types.
-* @def tnet_socket_type_e
-**/
-TNET_BEGIN_DECLS
-
-
-typedef enum tnet_socket_type_e
-{
- tnet_socket_type_invalid = 0x0000, /**< Invalid socket.*/
-
-#define TNET_SOCKET_TYPE_IPV4 (0x0001 << 0)
-#define TNET_SOCKET_TYPE_UDP (0x0001 << 1)
-#define TNET_SOCKET_TYPE_TCP (0x0001 << 2)
-#define TNET_SOCKET_TYPE_TLS (0x0001 << 3)
-#define TNET_SOCKET_TYPE_SCTP (0x0001 << 4)
- tnet_socket_type_udp_ipv4 = (TNET_SOCKET_TYPE_IPV4 | TNET_SOCKET_TYPE_UDP), /**< UDP/IPv4 socket.*/
- tnet_socket_type_tcp_ipv4 = (TNET_SOCKET_TYPE_IPV4 | TNET_SOCKET_TYPE_TCP), /**< TCP/IPv4 socket.*/
- tnet_socket_type_tls_ipv4 = (TNET_SOCKET_TYPE_IPV4 | TNET_SOCKET_TYPE_TLS), /**< TLS/IPv4 socket.*/
- tnet_socket_type_sctp_ipv4 = (TNET_SOCKET_TYPE_IPV4 | TNET_SOCKET_TYPE_SCTP), /**< SCTP/IPv4 socket.*/
-
-#define TNET_SOCKET_TYPE_IPSEC (0x0001 << 8)
- tnet_socket_type_udp_ipsec_ipv4 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_udp_ipv4), /**< UDP/IPSec/IPv4 socket.*/
- tnet_socket_type_tcp_ipsec_ipv4 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_tcp_ipv4), /**< TCP/IPSec/IPv4 socket.*/
- tnet_socket_type_tls_ipsec_ipv4 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_tls_ipv4), /**< TLS/IPSec /IPv4socket.*/
- tnet_socket_type_sctp_ipsec_ipv4 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_sctp_ipv4), /**< SCTP/IPSec/IPv4 socket.*/
-
-#define TNET_SOCKET_TYPE_IPV6 (0x0001 << 12)
- tnet_socket_type_udp_ipv6 = (TNET_SOCKET_TYPE_IPV6 | (tnet_socket_type_udp_ipv4 ^ TNET_SOCKET_TYPE_IPV4)), /**< UDP/IPv6 socket.*/
- tnet_socket_type_tcp_ipv6 = (TNET_SOCKET_TYPE_IPV6 | (tnet_socket_type_tcp_ipv4 ^ TNET_SOCKET_TYPE_IPV4)), /**< TCP/IPv6 socket.*/
- tnet_socket_type_tls_ipv6 = (TNET_SOCKET_TYPE_IPV6 | (tnet_socket_type_tls_ipv4 ^ TNET_SOCKET_TYPE_IPV4)), /**< TLS/IPv6 socket.*/
- tnet_socket_type_sctp_ipv6 = (TNET_SOCKET_TYPE_IPV6 | (tnet_socket_type_sctp_ipv4 ^ TNET_SOCKET_TYPE_IPV4)), /**< SCTP/IPv6 socket.*/
- tnet_socket_type_udp_ipsec_ipv6 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_udp_ipv6), /**< UDP/IPSec/IPv6 socket.*/
- tnet_socket_type_tcp_ipsec_ipv6 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_tcp_ipv6), /**< TCP/IPSec/IPv6 socket.*/
- tnet_socket_type_tls_ipsec_ipv6 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_tls_ipv6), /**< TLS/IPSec/IPv6 socket.*/
- tnet_socket_type_sctp_ipsec_ipv6 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_sctp_ipv6),/**< SCTP/IPSec/IPv6 socket.*/
-
-#define TNET_SOCKET_TYPE_IPV46 (TNET_SOCKET_TYPE_IPV4 | TNET_SOCKET_TYPE_IPV6)
- tnet_socket_type_udp_ipv46 = (TNET_SOCKET_TYPE_IPV46 | (tnet_socket_type_udp_ipv4 | tnet_socket_type_udp_ipv6)), /**< UDP/IPv4/6 socket.*/
- tnet_socket_type_tcp_ipv46 = (TNET_SOCKET_TYPE_IPV46 | (tnet_socket_type_tcp_ipv4 | tnet_socket_type_tcp_ipv6)), /**< TCP/IPv4/6 socket.*/
- tnet_socket_type_tls_ipv46 = (TNET_SOCKET_TYPE_IPV46 | (tnet_socket_type_tls_ipv4 | tnet_socket_type_tls_ipv6)), /**< TLS/IPv4/6 socket.*/
- tnet_socket_type_sctp_ipv46 = (TNET_SOCKET_TYPE_IPV46 | (tnet_socket_type_sctp_ipv4 | tnet_socket_type_sctp_ipv6)), /**< SCTP/IPv4/6 socket.*/
- tnet_socket_type_udp_ipsec_ipv46 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_udp_ipv46), /**< UDP/IPSec/IPv4/6 socket.*/
- tnet_socket_type_tcp_ipsec_ipv46 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_tcp_ipv46), /**< TCP/IPSec/IPv4/6 socket.*/
- tnet_socket_type_tls_ipsec_ipv46 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_tls_ipv46), /**< TLS/IPSec/IPv4/6 socket.*/
- tnet_socket_type_sctp_ipsec_ipv46 = (TNET_SOCKET_TYPE_IPSEC | tnet_socket_type_sctp_ipv46),/**< SCTP/IPSec/IPv4/6 socket.*/
-}
-tnet_socket_type_t;
-
-
-/**@def TNET_SOCKET_IS_VALID
-* Checks the socket validity.
-*/
-#define TNET_SOCKET_IS_VALID(socket) ((socket) && (socket->type !=tnet_socket_type_invalid) && (socket)->fd >0)
-
-#define TNET_SOCKET_TYPE_IS_STREAM(type) ( ((type & TNET_SOCKET_TYPE_UDP) != TNET_SOCKET_TYPE_UDP) )
-#define TNET_SOCKET_TYPE_IS_DGRAM(type) ( ((type & TNET_SOCKET_TYPE_UDP) == TNET_SOCKET_TYPE_UDP) )
-
-#define TNET_SOCKET_TYPE_IS_IPV4(type) ( ((type & TNET_SOCKET_TYPE_IPV4) == TNET_SOCKET_TYPE_IPV4) )
-#define TNET_SOCKET_TYPE_IS_IPV6(type) ( ((type & TNET_SOCKET_TYPE_IPV6) == TNET_SOCKET_TYPE_IPV6) )
-#define TNET_SOCKET_TYPE_IS_IPV46(type) ( TNET_SOCKET_TYPE_IS_IPV4(type) && TNET_SOCKET_TYPE_IS_IPV6(type) )
-
-#define TNET_SOCKET_TYPE_IS_IPSEC(type) ( ((type & TNET_SOCKET_TYPE_IPSEC) == TNET_SOCKET_TYPE_IPSEC) )
-
-#define TNET_SOCKET_TYPE_IS_UDP(type) ( ((type & TNET_SOCKET_TYPE_UDP) == TNET_SOCKET_TYPE_UDP) )
-#define TNET_SOCKET_TYPE_IS_TCP(type) ( ((type & TNET_SOCKET_TYPE_TCP) == TNET_SOCKET_TYPE_TCP) )
-#define TNET_SOCKET_TYPE_IS_TLS(type) ( ((type & TNET_SOCKET_TYPE_TLS) == TNET_SOCKET_TYPE_TLS) )
-#define TNET_SOCKET_TYPE_IS_SCTP(type) ( ((type & TNET_SOCKET_TYPE_SCTP) == TNET_SOCKET_TYPE_SCTP) )
-
-#define TNET_SOCKET_TYPE_IS_SECURE(type) (TNET_SOCKET_TYPE_IS_IPSEC(type) || TNET_SOCKET_TYPE_IS_TLS(type) )
-
-#define TNET_SOCKET_TYPE_UNSET(type, OP) (type = TNET_SOCKET_TYPE_IS_##OP(type) ? type ^= TNET_SOCKET_TYPE_##OP : type)
-
-#define TNET_SOCKET_TYPE_SET_IPV4(type) (type |= TNET_SOCKET_TYPE_IPV4)
-#define TNET_SOCKET_TYPE_SET_IPV4Only(type) (type = TNET_SOCKET_TYPE_IS_IPV6(type) ? (type ^TNET_SOCKET_TYPE_IPV6)|TNET_SOCKET_TYPE_IPV4 : type)
-#define TNET_SOCKET_TYPE_SET_IPV6(type) (type |= TNET_SOCKET_TYPE_IPV6)
-#define TNET_SOCKET_TYPE_SET_IPV6Only(type) (type = TNET_SOCKET_TYPE_IS_IPV4(type) ? (type ^TNET_SOCKET_TYPE_IPV4)|TNET_SOCKET_TYPE_IPV6 : type)
-
-#define TNET_SOCKET_TYPE_SET_IPSEC(type) (type |=TNET_SOCKET_TYPE_IPSEC)
-
-#define TNET_SOCKET_TYPE_SET_UDP(type) (TNET_SOCKET_TYPE_UNSET(type,TCP), TNET_SOCKET_TYPE_UNSET(type,TLS), TNET_SOCKET_TYPE_UNSET(type,SCTP), type |=TNET_SOCKET_TYPE_UDP)
-#define TNET_SOCKET_TYPE_SET_TCP(type) (TNET_SOCKET_TYPE_UNSET(type,UDP), TNET_SOCKET_TYPE_UNSET(type,TLS), TNET_SOCKET_TYPE_UNSET(type,SCTP), type |=TNET_SOCKET_TYPE_TCP)
-#define TNET_SOCKET_TYPE_SET_TLS(type) (TNET_SOCKET_TYPE_UNSET(type,TCP), TNET_SOCKET_TYPE_UNSET(type,UDP), TNET_SOCKET_TYPE_UNSET(type,SCTP), type |=TNET_SOCKET_TYPE_TLS)
-#define TNET_SOCKET_TYPE_SET_SCTP(type) (TNET_SOCKET_TYPE_UNSET(type,TCP), TNET_SOCKET_TYPE_UNSET(type,TLS), TNET_SOCKET_TYPE_UNSET(type,UDP), type |=TNET_SOCKET_TYPE_SCTP)
-
-/**
-* @def TNET_SOCKET_HOST_ANY
-* Any IPv4/IPv6 host.
-*/
-/**
-* @def TNET_SOCKET_PORT_ANY
-* Any port.
-*/
-#define TNET_SOCKET_HOST_ANY 0
-#define TNET_SOCKET_PORT_ANY 0
-
-/**
-* Socket.
-*/
-typedef struct tnet_socket_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_socket_type_t type;
- tnet_fd_t fd;
- tnet_ip_t ip;
- uint16_t port;
-
- tnet_tls_socket_handle_t* tlshandle;
-}
-tnet_socket_t;
-
-typedef tnet_socket_t tnet_socket_udp_t; /**< UDP socket. */
-typedef tnet_socket_t tnet_socket_tcp_t; /**< TCP socket. */
-typedef tnet_socket_t tnet_socket_tls_t; /**< TLS socket. */
-typedef tnet_socket_t tnet_socket_ipsec_t; /**< IPSec socket. */
-typedef tsk_list_t tnet_sockets_L_t; /**< List of @ref tnet_socket_t elements. */
-
-int tnet_socket_set_tlsfiles(tnet_socket_tls_t* socket, int isClient, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk);
-
-TINYNET_API tnet_socket_t* tnet_socket_create_2(const char*host, tnet_port_t port, tnet_socket_type_t type, tsk_bool_t nonblocking, tsk_bool_t bindsocket);
-TINYNET_API tnet_socket_t* tnet_socket_create(const char* host, tnet_port_t port, tnet_socket_type_t type);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_socket_def_t;
-
-
-TNET_END_DECLS
-
-#endif /* TNET_SOCKET_H */
-
diff --git a/branches/1.0/tinyNET/src/tnet_transport.c b/branches/1.0/tinyNET/src/tnet_transport.c
deleted file mode 100644
index 75cdf85..0000000
--- a/branches/1.0/tinyNET/src/tnet_transport.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_transport.c
- * @brief Network transport layer.
- *
- * <h2>10.2 Tansport</h2>
- * A transport layer always has a master socket which determine what kind of network traffic we expect (stream or dgram).
- * Stream transport can manage TCP, TLS and SCTP sockets. Datagram socket can only manage UDP sockets. <br>
- * A transport can hold both IPv4 and IPv6 sockets.
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_transport.h"
-
-#include "tsk_memory.h"
-#include "tsk_string.h"
-#include "tsk_debug.h"
-#include "tsk_thread.h"
-#include "tsk_buffer.h"
-
-#include <string.h> /* memcpy, ...(<#void * #>, <#const void * #>, <#tsk_size_t #>) */
-
-extern int tnet_transport_prepare(tnet_transport_t *transport);
-extern int tnet_transport_unprepare(tnet_transport_t *transport);
-extern void *tnet_transport_mainthread(void *param);
-extern int tnet_transport_stop(tnet_transport_t *transport);
-
-static void *run(void* self);
-
-
-tnet_transport_t* tnet_transport_create(const char* host, tnet_port_t port, tnet_socket_type_t type, const char* description)
-{
- return tsk_object_new(tnet_transport_def_t, host, port, type, description);
-}
-
-tnet_transport_event_t* tnet_transport_event_create(tnet_transport_event_type_t type, const void* callback_data, tnet_fd_t fd)
-{
- return tsk_object_new(tnet_transport_event_def_t, type, callback_data, fd);
-}
-
-int tnet_transport_start(tnet_transport_handle_t* handle)
-{
- int ret = -1;
- if(handle){
- tnet_transport_t *transport = handle;
-
- /* prepare transport */
- if((ret = tnet_transport_prepare(transport))){
- TSK_DEBUG_ERROR("Failed to prepare transport.");
- goto bail;
- }
-
- /* start transport */
- TSK_RUNNABLE(transport)->run = run;
- if((ret = tsk_runnable_start(TSK_RUNNABLE(transport), tnet_transport_event_def_t))){
- TSK_DEBUG_ERROR("Failed to start transport.");
- goto bail;
- }
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- }
-
-bail:
- return ret;
-}
-
-int tnet_transport_issecure(const tnet_transport_handle_t *handle)
-{
- if(handle)
- {
- const tnet_transport_t *transport = handle;
- if(transport->master){
- return TNET_SOCKET_TYPE_IS_SECURE(transport->master->type);
- }
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- }
- return 0;
-}
-
-const char* tnet_transport_get_description(const tnet_transport_handle_t *handle)
-{
- if(handle){
- const tnet_transport_t *transport = handle;
- return transport->description;
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- return tsk_null;
- }
-}
-
-int tnet_transport_get_ip_n_port(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)
-{
- if(handle){
- return tnet_get_ip_n_port(fd, ip, port);
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- }
- return -1;
-}
-
-int tnet_transport_get_ip_n_port_2(const tnet_transport_handle_t *handle, tnet_ip_t *ip, tnet_port_t *port)
-{
- const tnet_transport_t *transport = handle;
- if(transport){
- // do not check the master, let the application die if "null"
- if(ip){
- memcpy(*ip, transport->master->ip, sizeof(transport->master->ip));
- }
- if(port){
- *port = transport->master->port;
- }
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- return -1;
- }
-}
-
-int tnet_transport_set_natt_ctx(tnet_transport_handle_t *handle, tnet_nat_context_handle_t* natt_ctx)
-{
- tnet_transport_t *transport = handle;
-
- if(transport && natt_ctx){
- TSK_OBJECT_SAFE_FREE(transport->natt_ctx); // delete old
- transport->natt_ctx = tsk_object_ref(natt_ctx);
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("Invalid parameter");
- return -1;
- }
-}
-
-int tnet_transport_get_public_ip_n_port(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)
-{
- tsk_bool_t stun_ok = tsk_false;
- tnet_nat_context_handle_t* natt_ctx;
- const tnet_transport_t *transport = handle;
- if(!transport){
- TSK_DEBUG_ERROR("Invalid parameter");
- return -1;
- }
-
- if(TNET_SOCKET_TYPE_IS_DGRAM(transport->type) && (natt_ctx = tsk_object_ref(transport->natt_ctx))){
- tnet_stun_binding_id_t bind_id = TNET_STUN_INVALID_BINDING_ID;
- // if the socket is already monitored by the transport we should pause beacuse both the transport and
- // NAT binder will try to read from it
- tsk_bool_t pause_socket = (TSK_RUNNABLE(transport)->running || TSK_RUNNABLE(transport)->started);
-
- // FIXME: change when ICE will be fully implemented
- TSK_DEBUG_INFO("Getting public address");
- // Pause the soket
- if(pause_socket){
- tnet_transport_pause_socket(transport, fd, tsk_true);
- }
- // Performs STUN binding
- bind_id = tnet_nat_stun_bind(transport->natt_ctx, fd);
- // Resume the socket
- if(pause_socket){
- tnet_transport_pause_socket(transport, fd, tsk_false);
- }
-
- if(TNET_STUN_IS_VALID_BINDING_ID(bind_id)){
- char* public_ip = tsk_null;
- if(tnet_nat_stun_get_reflexive_address(transport->natt_ctx, bind_id, &public_ip, port) == 0){
- if(ip && public_ip){
- tsk_size_t ip_len = tsk_strlen(public_ip);
- memcpy(ip, public_ip, ip_len> sizeof(*ip)?sizeof(*ip):ip_len);
- }
- stun_ok = tsk_true;
- }
- TSK_FREE(public_ip);
- tnet_nat_stun_unbind(transport->natt_ctx, bind_id);
- }
- tsk_object_unref(natt_ctx);
- }
-
- if(!stun_ok){
- return tnet_transport_get_ip_n_port(handle, fd, ip, port);
- }
-
- return 0;
-}
-
-tnet_socket_type_t tnet_transport_get_type(const tnet_transport_handle_t *handle)
-{
- if(handle){
- const tnet_transport_t *transport = handle;
- return transport->type;
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- }
- return tnet_socket_type_invalid;
-}
-
-tnet_fd_t tnet_transport_get_master_fd(const tnet_transport_handle_t *handle)
-{
- if(handle){
- const tnet_transport_t *transport = handle;
- return transport->master->fd;
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- }
- return TNET_INVALID_FD;
-}
-
-/**
-* Connects a socket.
-* @param handle The transport to use to connect() the socket. The new socket will be managed by this transport.
-* @param host The remote @a host to connect() to.
-* @param port The remote @a port to connect() to.
-* @param type The type of the socket to use to connect() to the remote @a host.
-* @retval The newly connected socket. For non-blocking sockets you should use @ref tnet_sockfd_waitUntilWritable to check
-* the socket for writability.
-* @sa tnet_sockfd_waitUntilWritable.
-*/
-tnet_fd_t tnet_transport_connectto(const tnet_transport_handle_t *handle, const char* host, tnet_port_t port, tnet_socket_type_t type)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- struct sockaddr_storage to;
- int status = -1;
- tnet_fd_t fd = TNET_INVALID_FD;
-
- if(!transport || !transport->master){
- TSK_DEBUG_ERROR("Invalid transport handle.");
- goto bail;
- }
-
- if((TNET_SOCKET_TYPE_IS_STREAM(transport->master->type) && !TNET_SOCKET_TYPE_IS_STREAM(type)) ||
- (TNET_SOCKET_TYPE_IS_DGRAM(transport->master->type) && !TNET_SOCKET_TYPE_IS_DGRAM(type))){
- TSK_DEBUG_ERROR("Master/destination types mismatch [%u/%u]", transport->master->type, type);
- goto bail;
- }
-
- /* Init destination sockaddr fields */
- if((status = tnet_sockaddr_init(host, port, type, &to))){
- TSK_DEBUG_ERROR("Invalid HOST/PORT [%s/%u]", host, port);
- goto bail;
- }
- else if(TNET_SOCKET_TYPE_IS_IPV46(type)){
- /* Update the type (unambiguously) */
- if(to.ss_family == AF_INET6){
- TNET_SOCKET_TYPE_SET_IPV6Only(type);
- }
- else{
- TNET_SOCKET_TYPE_SET_IPV4Only(type);
- }
- }
-
- /*
- * STREAM ==> create new socket and connect it to the remote host.
- * DGRAM ==> connect the master to the remote host.
- */
- if(TNET_SOCKET_TYPE_IS_STREAM(type)){
- /* Create client socket descriptor. */
- if(status = tnet_sockfd_init(transport->local_ip, TNET_SOCKET_PORT_ANY, type, &fd)){
- TSK_DEBUG_ERROR("Failed to create new sockfd.");
- goto bail;
- }
-
- /* Add the socket */
- if(status = tnet_transport_add_socket(handle, fd, type, tsk_true, tsk_true)){
- TNET_PRINT_LAST_ERROR("Failed to add new socket.");
-
- tnet_sockfd_close(&fd);
- goto bail;
- }
- }
- else{
- fd = transport->master->fd;
- }
-
- if((status = tnet_sockfd_connectto(fd, (const struct sockaddr_storage *)&to))){
- if(fd != transport->master->fd){
- tnet_sockfd_close(&fd);
- }
- goto bail;
- }
- else{
- if(TNET_SOCKET_TYPE_IS_TLS(type)){
- transport->tls.have_tls = tsk_true;
- /*transport->connected = !*/tnet_tls_socket_connect((tnet_tls_socket_handle_t*)tnet_transport_get_tlshandle(handle, fd));
- }
- else{
- //transport->connected = tsk_true;
- }
- }
-
-bail:
- return fd;
-}
-
-int tnet_transport_set_callback(const tnet_transport_handle_t *handle, tnet_transport_cb_f callback, const void* callback_data)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- int ret = -1;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return ret;
- }
-
- transport->callback = callback;
- transport->callback_data = callback_data;
- return 0;
-}
-
-
-int tnet_transport_shutdown(tnet_transport_handle_t* handle)
-{
- if(handle){
- int ret;
- if(!(ret = tnet_transport_stop(handle))){
- ret = tnet_transport_unprepare(handle);
- }
- return ret;
- }
- else{
- TSK_DEBUG_ERROR("NULL transport object.");
- return -1;
- }
-}
-
-
-
-/*
-* Runnable interface implementation.
-*/
-static void *run(void* self)
-{
- int ret = 0;
- tsk_list_item_t *curr;
- tnet_transport_t *transport = self;
-
- TSK_DEBUG_INFO("Transport::run() - enter");
-
- /* create main thread */
- if((ret = tsk_thread_create(transport->mainThreadId, tnet_transport_mainthread, transport))){ /* More important than "tsk_runnable_start" ==> start it first. */
- TSK_FREE(transport->context); /* Otherwise (tsk_thread_create is ok) will be freed when mainthread exit. */
- TSK_DEBUG_FATAL("Failed to create main thread [%d]", ret);
- return tsk_null;
- }
-
- TSK_RUNNABLE_RUN_BEGIN(transport);
-
- if((curr = TSK_RUNNABLE_POP_FIRST_SAFE(TSK_RUNNABLE(transport)))){
- const tnet_transport_event_t *e = (const tnet_transport_event_t*)curr->data;
-
- if(transport->callback){
- transport->callback(e);
- }
- tsk_object_unref(curr);
- }
-
- TSK_RUNNABLE_RUN_END(transport);
-
- TSK_DEBUG_INFO("Transport::run() - exit");
-
- return tsk_null;
-}
-
-
-
-
-//=================================================================================================
-// Transport object definition
-//
-static tsk_object_t* tnet_transport_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_transport_t *transport = self;
- if(transport){
- const char *host = va_arg(*app, const char*);
-
-#if defined(__GNUC__)
- tnet_port_t port = (uint16_t)va_arg(*app, unsigned);
-#else
- tnet_port_t port = (tnet_port_t)va_arg(*app, tnet_port_t);
-#endif
-
- tnet_socket_type_t type = va_arg(*app, tnet_socket_type_t);
- const char *description = va_arg(*app, const char*);
-
- if(description){
- transport->description = tsk_strdup(description);
- }
-
- transport->type = type;
-
- transport->master = tnet_socket_create(host, port, type);
- transport->context = tnet_transport_context_create();
-
- if(TNET_SOCKET_TYPE_IS_IPV46(transport->type)){
- transport->local_ip = tsk_strdup(host); /* FQDN */
- }
- else{
- transport->local_ip = tsk_strdup(transport->master->ip); /* IP address */
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_transport_dtor(tsk_object_t * self)
-{
- tnet_transport_t *transport = self;
- if(transport){
- tnet_transport_shutdown(transport);
- TSK_OBJECT_SAFE_FREE(transport->master);
- TSK_OBJECT_SAFE_FREE(transport->context);
- TSK_OBJECT_SAFE_FREE(transport->natt_ctx);
- TSK_FREE(transport->description);
- TSK_FREE(transport->local_ip);
-
- // tls
- TSK_FREE(transport->tls.ca);
- TSK_FREE(transport->tls.pbk);
- TSK_FREE(transport->tls.pvk);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_transport_def_s =
-{
- sizeof(tnet_transport_t),
- tnet_transport_ctor,
- tnet_transport_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_transport_def_t = &tnet_transport_def_s;
-
-
-
-//=================================================================================================
-// Transport event object definition
-//
-static tsk_object_t* tnet_transport_event_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_transport_event_t *e = self;
- if(e){
- e->type = va_arg(*app, tnet_transport_event_type_t);
- e->callback_data = va_arg(*app, const void*);
- e->local_fd = va_arg(*app, tnet_fd_t);
- }
- return self;
-}
-
-static tsk_object_t* tnet_transport_event_dtor(tsk_object_t * self)
-{
- tnet_transport_event_t *e = self;
- if(e){
- TSK_FREE(e->data);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_transport_event_def_s =
-{
- sizeof(tnet_transport_event_t),
- tnet_transport_event_ctor,
- tnet_transport_event_dtor,
- 0,
-};
-const tsk_object_def_t *tnet_transport_event_def_t = &tnet_transport_event_def_s;
-
diff --git a/branches/1.0/tinyNET/src/tnet_transport.h b/branches/1.0/tinyNET/src/tnet_transport.h
deleted file mode 100644
index a813c09..0000000
--- a/branches/1.0/tinyNET/src/tnet_transport.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_transport.h
- * @brief Network transport layer.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_SERVER_H
-#define TNET_SERVER_H
-
-#include "tinynet_config.h"
-
-#include "tnet_socket.h"
-#include "tnet_utils.h"
-#include "tnet_nat.h"
-
-#include "tsk_runnable.h"
-
-TNET_BEGIN_DECLS
-
-#define DGRAM_MAX_SIZE 8192
-#define STREAM_MAX_SIZE 8192
-
-#define TNET_TRANSPORT_CB_F(callback) ((tnet_transport_cb_f)callback)
-
-typedef void tnet_transport_handle_t;
-
-typedef enum tnet_transport_event_type_e
-{
- event_data,
- event_closed,
- event_error,
- event_connected,
- event_accepted
-}
-tnet_transport_event_type_t;
-
-typedef struct tnet_transport_event_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_transport_event_type_t type;
-
- void* data;
- tsk_size_t size;
-
- const void* callback_data;
- tnet_fd_t local_fd;
- struct sockaddr_storage remote_addr;
-}
-tnet_transport_event_t;
-
-typedef int (*tnet_transport_cb_f)(const tnet_transport_event_t* e);
-
-TINYNET_API int tnet_transport_start(tnet_transport_handle_t* transport);
-TINYNET_API int tnet_transport_issecure(const tnet_transport_handle_t *handle);
-TINYNET_API const char* tnet_transport_get_description(const tnet_transport_handle_t *handle);
-TINYNET_API int tnet_transport_get_ip_n_port(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port);
-TINYNET_API int tnet_transport_get_ip_n_port_2(const tnet_transport_handle_t *handle, tnet_ip_t *ip, tnet_port_t *port);
-TINYNET_API int tnet_transport_set_natt_ctx(tnet_transport_handle_t *handle, tnet_nat_context_handle_t* natt_ctx);
-TINYNET_API int tnet_transport_get_public_ip_n_port(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port);
-
-TINYNET_API int tnet_transport_isconnected(const tnet_transport_handle_t *handle, tnet_fd_t fd);
-TINYNET_API int tnet_transport_have_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd);
-TINYNET_API const tnet_tls_socket_handle_t* tnet_transport_get_tlshandle(const tnet_transport_handle_t *handle, tnet_fd_t fd);
-TINYNET_API int tnet_transport_add_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_socket_type_t type, tsk_bool_t take_ownership, tsk_bool_t isClient);
-TINYNET_API int tnet_transport_pause_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd, tsk_bool_t pause);
-TINYNET_API int tnet_transport_remove_socket(const tnet_transport_handle_t *handle, tnet_fd_t* fd);
-TINYNET_API tnet_fd_t tnet_transport_connectto(const tnet_transport_handle_t *handle, const char* host, tnet_port_t port, tnet_socket_type_t type);
-#define tnet_transport_connectto_2(handle, host, port) tnet_transport_connectto(handle, host, port, tnet_transport_get_type(handle))
-TINYNET_API tsk_size_t tnet_transport_send(const tnet_transport_handle_t *handle, tnet_fd_t from, const void* buf, tsk_size_t size);
-TINYNET_API tsk_size_t tnet_transport_sendto(const tnet_transport_handle_t *handle, tnet_fd_t from, const struct sockaddr *to, const void* buf, tsk_size_t size);
-
-TINYNET_API int tnet_transport_set_callback(const tnet_transport_handle_t *handle, tnet_transport_cb_f callback, const void* callback_data);
-
-TINYNET_API tnet_socket_type_t tnet_transport_get_type(const tnet_transport_handle_t *handle);
-TINYNET_API tnet_fd_t tnet_transport_get_master_fd(const tnet_transport_handle_t *handle);
-TINYNET_API int tnet_transport_shutdown(tnet_transport_handle_t* handle);
-
-typedef struct tnet_transport_s
-{
- TSK_DECLARE_RUNNABLE;
-
- tnet_socket_type_t type;
- char* local_ip;
- tnet_nat_context_handle_t* natt_ctx;
- tnet_socket_t *master;
-
- tsk_object_t *context;
- tsk_bool_t prepared;
-
- //unsigned connected:1;
- void* mainThreadId[1];
-
- char *description;
-
- tnet_transport_cb_f callback;
- const void* callback_data;
-
- /* TLS certs */
- struct {
- char* ca;
- char* pvk;
- char* pbk;
- tsk_bool_t have_tls;
- }tls;
-}
-tnet_transport_t;
-
-tsk_object_t* tnet_transport_context_create();
-TINYNET_API tnet_transport_t* tnet_transport_create(const char* host, tnet_port_t port, tnet_socket_type_t type, const char* description);
-tnet_transport_event_t* tnet_transport_event_create(tnet_transport_event_type_t type, const void* callback_data, tnet_fd_t fd);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_transport_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_transport_event_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_transport_context_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_SERVER_H */
-
diff --git a/branches/1.0/tinyNET/src/tnet_transport_poll.c b/branches/1.0/tinyNET/src/tnet_transport_poll.c
deleted file mode 100644
index e409418..0000000
--- a/branches/1.0/tinyNET/src/tnet_transport_poll.c
+++ /dev/null
@@ -1,829 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_transport_poll.c
- * @brief Network transport layer using polling.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_transport.h"
-#include "tsk_memory.h"
-#include "tsk_string.h"
-#include "tsk_debug.h"
-#include "tsk_thread.h"
-#include "tsk_buffer.h"
-#include "tsk_safeobj.h"
-
-#if TNET_USE_POLL
-
-#include "tnet_poll.h"
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
-# import <CFNetwork/CFNetwork.h>
-#endif
-
-#define TNET_MAX_FDS 64
-
-/*== Socket description ==*/
-typedef struct transport_socket_s
-{
- tnet_fd_t fd;
- tsk_bool_t owner;
- tsk_bool_t connected;
- tsk_bool_t paused;
-
- tnet_socket_type_t type;
- tnet_tls_socket_handle_t* tlshandle;
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
- CFReadStreamRef cfReadStream;
- CFWriteStreamRef cfWriteStream;
-#endif
-}
-transport_socket_t;
-
-/*== Transport context structure definition ==*/
-typedef struct transport_context_s
-{
- TSK_DECLARE_OBJECT;
-
- tsk_size_t count;
- short events;
- tnet_fd_t pipeW;
- tnet_fd_t pipeR;
- tnet_pollfd_t ufds[TNET_MAX_FDS];
- transport_socket_t* sockets[TNET_MAX_FDS];
-
- TSK_DECLARE_SAFEOBJ;
-}
-transport_context_t;
-
-static transport_socket_t* getSocket(transport_context_t *context, tnet_fd_t fd);
-static int addSocket(tnet_fd_t fd, tnet_socket_type_t type, tnet_transport_t *transport, tsk_bool_t take_ownership, tsk_bool_t is_client);
-static int removeSocket(int index, transport_context_t *context);
-
-
-int tnet_transport_add_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_socket_type_t type, tsk_bool_t take_ownership, tsk_bool_t isClient)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t* context;
- static char c = '\0';
- int ret = -1;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return ret;
- }
-
- if(!(context = (transport_context_t*)transport->context)){
- TSK_DEBUG_ERROR("Invalid context.");
- return -2;
- }
-
- if(TNET_SOCKET_TYPE_IS_TLS(type)){
- transport->tls.have_tls = 1;
- }
-
- if((ret = addSocket(fd, type, transport, take_ownership, isClient))){
- TSK_DEBUG_ERROR("Failed to add new Socket.");
- return ret;
- }
-
- // signal
- if(context->pipeW){
- if((ret = write(context->pipeW, &c, 1)) > 0){
- TSK_DEBUG_INFO("Socket added (external call) %d", fd);
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("Failed to add new Socket.");
- return ret;
- }
- }else{
- TSK_DEBUG_WARN("pipeW (write site) not initialized yet.");
- return 0; //Will be taken when mainthead start
- }
-}
-
-int tnet_transport_pause_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd, tsk_bool_t pause)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t *context;
- transport_socket_t* socket;
-
- if(!transport || !(context = (transport_context_t*)transport->context)){
- TSK_DEBUG_ERROR("Invalid parameter");
- return -1;
- }
-
- if((socket = getSocket(context, fd))){
- socket->paused = pause;
- }
- else{
- TSK_DEBUG_WARN("Socket does not exist in this context");
- }
- return 0;
-}
-
-/* Remove socket */
-int tnet_transport_remove_socket(const tnet_transport_handle_t *handle, tnet_fd_t *fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t *context;
- int ret = -1;
- tsk_size_t i;
- tsk_bool_t found = tsk_false;
-
- TSK_DEBUG_INFO("Removing socket %d", *fd);
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return ret;
- }
-
- if(!(context = (transport_context_t*)transport->context)){
- TSK_DEBUG_ERROR("Invalid context.");
- return -2;
- }
-
- for(i=0; i<context->count; i++){
- if(context->sockets[i]->fd == *fd){
- removeSocket(i, context);
- found = tsk_true;
- *fd = TNET_INVALID_FD;
- break;
- }
- }
-
- if(found){
- /* Signal */
- static char c = '\0';
- ret = write(context->pipeW, &c, 1);
- return (ret > 0 ? 0 : ret);
- }
-
- // ...
-
- return -1;
-}
-
-
-tsk_size_t tnet_transport_send(const tnet_transport_handle_t *handle, tnet_fd_t from, const void* buf, tsk_size_t size)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- int numberOfBytesSent = 0;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid transport handle.");
- goto bail;
- }
-
- if(transport->tls.have_tls){
- const transport_socket_t* socket = getSocket(transport->context, from);
- if(socket && socket->tlshandle){
- if(!tnet_tls_socket_send(socket->tlshandle, buf, size)){
- numberOfBytesSent = size;
- }
- else{
- numberOfBytesSent = 0;
- }
- goto bail;
- }
- }
- else if((numberOfBytesSent = send(from, buf, size, 0)) <= 0){
- TNET_PRINT_LAST_ERROR("send have failed.");
-
- //tnet_sockfd_close(&from);
- goto bail;
- }
-
-bail:
- return numberOfBytesSent;
-}
-
-tsk_size_t tnet_transport_sendto(const tnet_transport_handle_t *handle, tnet_fd_t from, const struct sockaddr *to, const void* buf, tsk_size_t size)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- int numberOfBytesSent = 0;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- goto bail;
- }
-
- if(!TNET_SOCKET_TYPE_IS_DGRAM(transport->master->type)){
- TSK_DEBUG_ERROR("In order to use sendto() you must use an udp transport.");
- goto bail;
- }
-
- if((numberOfBytesSent = sendto(from, buf, size, 0, to, tnet_get_sockaddr_size(to))) <= 0){
- TNET_PRINT_LAST_ERROR("sendto have failed.");
- goto bail;
- }
-
-bail:
- return numberOfBytesSent;
-}
-
-int tnet_transport_have_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return 0;
- }
-
- return (getSocket((transport_context_t*)transport->context, fd) != 0);
-}
-
-const tnet_tls_socket_handle_t* tnet_transport_get_tlshandle(const tnet_transport_handle_t *handle, tnet_fd_t fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- const transport_socket_t *socket;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return 0;
- }
-
- if((socket = getSocket((transport_context_t*)transport->context, fd))){
- return socket->tlshandle;
- }
- return 0;
-}
-
-
-/*== Get socket ==*/
-static transport_socket_t* getSocket(transport_context_t *context, tnet_fd_t fd)
-{
- tsk_size_t i;
- transport_socket_t* ret = 0;
-
- if(context){
- tsk_safeobj_lock(context);
- for(i=0; i<context->count; i++){
- if(context->sockets[i]->fd == fd){
- ret = context->sockets[i];
- break;
- }
- }
- tsk_safeobj_unlock(context);
- }
-
- return ret;
-}
-
-/*== Add new socket ==*/
-int addSocket(tnet_fd_t fd, tnet_socket_type_t type, tnet_transport_t *transport, tsk_bool_t take_ownership, tsk_bool_t is_client)
-{
- transport_context_t *context = transport?transport->context:0;
- if(context){
- transport_socket_t *sock = tsk_calloc(1, sizeof(transport_socket_t));
- sock->fd = fd;
- sock->type = type;
- sock->owner = take_ownership;
-
- if(TNET_SOCKET_TYPE_IS_TLS(sock->type)){
- sock->tlshandle = tnet_sockfd_set_tlsfiles(sock->fd, is_client, transport->tls.ca, transport->tls.pvk, transport->tls.pbk);
- }
-
- tsk_safeobj_lock(context);
-
- context->ufds[context->count].fd = fd;
- context->ufds[context->count].events = (fd == context->pipeR) ? TNET_POLLIN : context->events;
- context->ufds[context->count].revents = 0;
- context->sockets[context->count] = sock;
-
- context->count++;
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
- if(context->pipeR != sock->fd){
- if(TNET_SOCKET_TYPE_IS_DGRAM(sock->type)){
- CFSocketRef cfSocket;
-
- cfSocket = CFSocketCreateWithNative(kCFAllocatorDefault,
- sock->fd,
- kCFSocketReadCallBack,
- tsk_null,
- tsk_null);
-
- // Don't close the socket if the CFSocket is invalidated
- CFOptionFlags flags = CFSocketGetSocketFlags(cfSocket);
- flags = flags & ~kCFSocketCloseOnInvalidate;
- CFSocketSetSocketFlags(cfSocket, flags);
-
- if (CFSocketIsValid(cfSocket)) {
- CFSocketInvalidate(cfSocket);
- }
- CFRelease(cfSocket);
- }
- else if(TNET_SOCKET_TYPE_IS_STREAM(sock->type)){
- CFStreamCreatePairWithSocket(kCFAllocatorDefault, (CFSocketNativeHandle)sock->fd, &sock->cfReadStream, &sock->cfWriteStream);
-
- CFReadStreamSetProperty(sock->cfReadStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanFalse);
- CFWriteStreamSetProperty(sock->cfWriteStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanFalse);
-
- if(!CFReadStreamSetProperty(sock->cfReadStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP)){
- //TNET_PRINT_LAST_ERROR("CFReadStreamSetProperty(cfReadStream, kCFStreamNetworkServiceTypeVoIP) failed");
- }
- if(!CFWriteStreamSetProperty(sock->cfWriteStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP)){
- //TNET_PRINT_LAST_ERROR("CFReadStreamSetProperty(cfWriteStream, kCFStreamNetworkServiceTypeVoIP) failed");
- }
- }
-
- if(sock->cfReadStream){
- if(!CFReadStreamOpen(sock->cfReadStream)){
- //TNET_PRINT_LAST_ERROR("CFReadStreamOpen(cfWriteStream) failed");
- }
- }
- if(sock->cfWriteStream){
- if(!CFWriteStreamOpen(sock->cfWriteStream)){
- //TNET_PRINT_LAST_ERROR("CFWriteStreamOpen(cfWriteStream) failed");
- }
- }
- }
-#endif
-
- tsk_safeobj_unlock(context);
-
- TSK_DEBUG_INFO("Socket added %d", fd);
-
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("Context is Null.");
- return -1;
- }
-}
-
-/*== change connection state ==*/
-/*
-static void setConnected(tnet_fd_t fd, transport_context_t *context, int connected)
-{
- tsk_size_t i;
-
- for(i=0; i<context->count; i++)
- {
- if(context->sockets[i]->fd == fd){
- context->sockets[i]->connected = connected;
- }
- }
-}
-*/
-
-/*== Remove socket ==*/
-int removeSocket(int index, transport_context_t *context)
-{
- int i;
-
- tsk_safeobj_lock(context);
-
- if(index < (int)context->count){
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000
- // Even if we are not the owner as CFSocket is only supported at low level
- if(context->sockets[index]->cfReadStream){
- CFReadStreamClose(context->sockets[index]->cfReadStream);
- CFRelease(context->sockets[index]->cfReadStream);
- }
- if(context->sockets[index]->cfWriteStream){
- CFWriteStreamClose(context->sockets[index]->cfWriteStream);
- CFRelease(context->sockets[index]->cfWriteStream);
- }
-#endif
- /* Close the socket if we are the owner. */
- if(context->sockets[index]->owner){
- tnet_sockfd_close(&(context->sockets[index]->fd));
- }
-
- /* Free tls context */
- TSK_OBJECT_SAFE_FREE(context->sockets[index]->tlshandle);
-
- // Free socket
- TSK_FREE(context->sockets[index]);
-
- for(i=index ; i<context->count-1; i++){
- context->sockets[i] = context->sockets[i+1];
- context->ufds[i] = context->ufds[i+1];
- }
-
- context->sockets[context->count-1] = tsk_null;
- context->ufds[context->count-1].fd = 0;
- context->ufds[context->count-1].events = 0;
- context->ufds[context->count-1].revents = 0;
-
- context->count--;
- TSK_DEBUG_INFO("Socket removed");
- }
-
- tsk_safeobj_unlock(context);
-
- return 0;
-}
-
-int tnet_transport_stop(tnet_transport_t *transport)
-{
- int ret;
- transport_context_t *context;
-
- if(!transport){
- return -1;
- }
-
- context = transport->context;
-
- if((ret = tsk_runnable_stop(TSK_RUNNABLE(transport)))){
- return ret;
- }
-
- if(context){
- static char c = '\0';
-
- // signal
- tsk_safeobj_lock(context); // =>MUST
- if(tnet_transport_have_socket(transport, context->pipeR)){ // to avoid SIGPIPE=> check that there is at least one reader
- write(context->pipeW, &c, 1);
- }
- tsk_safeobj_unlock(context);
- }
-
- if(transport->mainThreadId[0]){
- return tsk_thread_join(transport->mainThreadId);
- }
- else{
- /* already soppped */
- return 0;
- }
-}
-
-int tnet_transport_prepare(tnet_transport_t *transport)
-{
- int ret = -1;
- transport_context_t *context;
- tnet_fd_t pipes[2];
-
- if(!transport || !transport->context){
- TSK_DEBUG_ERROR("Invalid parameter.");
- return -1;
- }
- else{
- context = transport->context;
- }
-
- if(transport->prepared){
- TSK_DEBUG_ERROR("Transport already prepared.");
- return -2;
- }
-
- /* set events */
- context->events = TNET_POLLIN | TNET_POLLNVAL | TNET_POLLERR;
- if(TNET_SOCKET_TYPE_IS_STREAM(transport->master->type)){
- context->events |= TNET_POLLOUT // emulate WinSock2 FD_CONNECT event
-//#if !defined(ANDROID)
-// | TNET_POLLHUP /* FIXME: always present */
-//#endif
- ;
- }
-
- /* Start listening */
- if(TNET_SOCKET_TYPE_IS_STREAM(transport->master->type)){
- if((ret = tnet_sockfd_listen(transport->master->fd, TNET_MAX_FDS))){
- TNET_PRINT_LAST_ERROR("listen have failed.");
- goto bail;
- }
- }
-
- /* Create and add pipes to the fd_set */
- if((ret = pipe(pipes))){
- TNET_PRINT_LAST_ERROR("Failed to create new pipes.");
- goto bail;
- }
-
- /* set both R and W sides */
- context->pipeR = pipes[0];
- context->pipeW = pipes[1];
-
- /* add R side */
- TSK_DEBUG_INFO("pipeR fd=%d", context->pipeR);
- if((ret = addSocket(context->pipeR, transport->master->type, transport, tsk_true, tsk_false))){
- goto bail;
- }
-
- /* Add the master socket to the context. */
- TSK_DEBUG_INFO("master fd=%d", transport->master->fd);
- if((ret = addSocket(transport->master->fd, transport->master->type, transport, tsk_true, tsk_false))){
- TSK_DEBUG_ERROR("Failed to add master socket");
- goto bail;
- }
-
- transport->prepared = tsk_true;
-
-bail:
- return ret;
-}
-
-int tnet_transport_unprepare(tnet_transport_t *transport)
-{
- //int ret = -1;
- transport_context_t *context;
-
- if(!transport || !transport->context){
- TSK_DEBUG_ERROR("Invalid parameter.");
- return -1;
- }
- else{
- context = transport->context;
- }
-
- if(!transport->prepared){
- return 0;
- }
-
- transport->prepared = tsk_false;
-
- while(context->count){
- removeSocket(0, context); // safe
- }
-
- return 0;
-}
-
-/*=== Main thread */
-void *tnet_transport_mainthread(void *param)
-{
- tnet_transport_t *transport = param;
- transport_context_t *context = transport->context;
- int ret;
- tsk_size_t i;
-
- transport_socket_t* active_socket;
-
- /* check whether the transport is already prepared */
- if(!transport->prepared){
- TSK_DEBUG_ERROR("Transport must be prepared before strating.");
- goto bail;
- }
-
- TSK_DEBUG_INFO("Starting [%s] server with IP {%s} on port {%d}...", transport->description, transport->master->ip, transport->master->port);
-
- while(TSK_RUNNABLE(transport)->running || TSK_RUNNABLE(transport)->started){
- if((ret = tnet_poll(context->ufds, context->count, -1)) < 0){
- TNET_PRINT_LAST_ERROR("poll have failed.");
- goto bail;
- }
-
- if(!TSK_RUNNABLE(transport)->running && !TSK_RUNNABLE(transport)->started){
- TSK_DEBUG_INFO("Stopping [%s] server with IP {%s} on port {%d}...", transport->description, transport->master->ip, transport->master->port);
- goto bail;
- }
-
- /* lock context */
- tsk_safeobj_lock(context);
-
- /* == == */
- for(i=0; i<context->count; i++)
- {
- if(!context->ufds[i].revents){
- continue;
- }
-
- if(context->ufds[i].fd == context->pipeR){
- TSK_DEBUG_INFO("PipeR event %d", context->ufds[i].revents);
- if(context->ufds[i].revents & TNET_POLLIN){
- static char __buffer[64];
- if(read(context->pipeR, __buffer, sizeof(__buffer))<0){
- TNET_PRINT_LAST_ERROR("Failed to read from the Pipe");
- }
- }
- else if(context->ufds[i].revents & TNET_POLLHUP){
- TNET_PRINT_LAST_ERROR("Pipe Error");
- goto bail;
- }
- context->ufds[i].revents = 0;
- continue;
- }
-
- /* Get active event and socket */
- active_socket = context->sockets[i];
-
- /*================== POLLIN ==================*/
- if(context->ufds[i].revents & TNET_POLLIN)
- {
- tsk_size_t len = 0;
- void* buffer = tsk_null;
- tnet_transport_event_t* e;
-
- //--TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLIN", transport->description);
-
- //
- // FIXME: check if accept() is needed or not
- //
-
-
- /* check whether the socket is paused or not */
- if(active_socket->paused){
- TSK_DEBUG_INFO("Socket is paused");
- goto TNET_POLLIN_DONE;
- }
-
- /* Retrieve the amount of pending data.
- * IMPORTANT: If you are using Symbian please update your SDK to the latest build (August 2009) to have 'FIONREAD'.
- * This apply whatever you are using the 3rd or 5th edition.
- * Download link: http://wiki.forum.nokia.com/index.php/Open_C/C%2B%2B_Release_History
- */
- if(tnet_ioctlt(active_socket->fd, FIONREAD, &len) < 0){
- /* It's probably an incoming connection --> try to accept() it */
- tnet_fd_t fd;
- if((fd = accept(active_socket->fd, tsk_null, 0)) != TNET_INVALID_SOCKET){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- FD_ACCEPT(fd=%d)", transport->description, fd);
- addSocket(fd, transport->master->type, transport, tsk_true, tsk_false);
- TSK_RUNNABLE_ENQUEUE(transport, event_accepted, transport->callback_data, fd);
- }
- else{
- TNET_PRINT_LAST_ERROR("IOCTLT FAILED.");
- tnet_transport_remove_socket(transport, &active_socket->fd);
- continue;
- }
- }
-
- if(!len){
- TSK_DEBUG_WARN("IOCTLT returned zero for fd=%d", active_socket->fd);
-#if defined(ANDROID) || 1 /* FIXME: On Android/MAC OS X this mean that the socket has been closed? */
- TSK_RUNNABLE_ENQUEUE(transport, event_closed, transport->callback_data, active_socket->fd);
- removeSocket(i, context);
-#else
- recv(active_socket->fd, 0, 0, 0);
-#endif
- continue;
-
- }
-
- if(!(buffer = tsk_calloc(len, sizeof(uint8_t)))){
- TSK_DEBUG_ERROR("TSK_CALLOC FAILED.");
- continue;
- }
-
-
- /* Receive the waiting data. */
- if(active_socket->tlshandle){
- int isEncrypted;
- tsk_size_t tlslen = len;
- if((ret = tnet_tls_socket_recv(active_socket->tlshandle, &buffer, &tlslen, &isEncrypted)) == 0){
- if(isEncrypted){
- TSK_FREE(buffer);
- continue;
- }
- len = tlslen;
- }
- }
- else if((ret = tnet_sockfd_recv(active_socket->fd, buffer, len, 0)) < 0){
- TSK_FREE(buffer);
-
- removeSocket(i, context);
- TNET_PRINT_LAST_ERROR("recv have failed.");
- continue;
- }
- else if((len != (tsk_size_t)ret) && len){ /* useless test? */
- len = (tsk_size_t)ret;
- /* buffer = tsk_realloc(buffer, len); */
- }
-
- e = tnet_transport_event_create(event_data, transport->callback_data, active_socket->fd);
- e->data = buffer;
- e->size = len;
-
- TSK_RUNNABLE_ENQUEUE_OBJECT_SAFE(TSK_RUNNABLE(transport), e);
-
-TNET_POLLIN_DONE:;
- }
-
-
- /*================== TNET_POLLOUT ==================*/
- if(context->ufds[i].revents & TNET_POLLOUT){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLOUT", transport->description);
- if(!active_socket->connected){
- active_socket->connected = tsk_true;
- TSK_RUNNABLE_ENQUEUE(transport, event_connected, transport->callback_data, active_socket->fd);
- }
- context->ufds[i].events &= ~TNET_POLLOUT;
- }
-
-
- /*================== TNET_POLLPRI ==================*/
- if(context->ufds[i].revents & TNET_POLLPRI){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLPRI", transport->description);
- }
-
- /*================== TNET_POLLHUP ==================*/
- if(context->ufds[i].revents & (TNET_POLLHUP)){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLHUP", transport->description);
-#if defined(ANDROID)
- /* FIXME */
-#else
- TSK_RUNNABLE_ENQUEUE(transport, event_closed, transport->callback_data, active_socket->fd);
- removeSocket(i, context);
-#endif
- }
-
- /*================== TNET_POLLERR ==================*/
- if(context->ufds[i].revents & (TNET_POLLERR)){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLERR", transport->description);
-
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- removeSocket(i, context);
- }
-
- /*================== TNET_POLLNVAL ==================*/
- if(context->ufds[i].revents & (TNET_POLLNVAL)){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLNVAL", transport->description);
-
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- removeSocket(i, context);
- }
-
-
- }/* for */
-
-done:
- /* unlock context */
- tsk_safeobj_unlock(context);
-
- } /* while */
-
-bail:
-
- TSK_DEBUG_INFO("Stopped [%s] server with IP {%s} on port {%d}", transport->description, transport->master->ip, transport->master->port);
- return 0;
-}
-
-
-
-
-
-
-
-
-void* tnet_transport_context_create()
-{
- return tsk_object_new(tnet_transport_context_def_t);
-}
-
-
-//=================================================================================================
-// Transport context object definition
-//
-static tsk_object_t* transport_context_ctor(tsk_object_t * self, va_list * app)
-{
- transport_context_t *context = self;
- if(context){
- tsk_safeobj_init(context);
- }
- return self;
-}
-
-static tsk_object_t* transport_context_dtor(tsk_object_t * self)
-{
- transport_context_t *context = self;
- if(context){
- while(context->count){
- removeSocket(0, context);
- }
- tsk_safeobj_deinit(context);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_transport_context_def_s =
-{
-sizeof(transport_context_t),
-transport_context_ctor,
-transport_context_dtor,
-tsk_null,
-};
-const tsk_object_def_t *tnet_transport_context_def_t = &tnet_transport_context_def_s;
-
-#endif /* HAVE_POLL_H */
-
-
diff --git a/branches/1.0/tinyNET/src/tnet_transport_win32.c b/branches/1.0/tinyNET/src/tnet_transport_win32.c
deleted file mode 100644
index baa745d..0000000
--- a/branches/1.0/tinyNET/src/tnet_transport_win32.c
+++ /dev/null
@@ -1,786 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_transport_win32.c
- * @brief Network transport layer for WIN32(XP/Vista/7) and WINCE(5.0 or higher) systems.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_transport.h"
-#include "tsk_memory.h"
-#include "tsk_string.h"
-#include "tsk_debug.h"
-#include "tsk_thread.h"
-#include "tsk_buffer.h"
-#include "tsk_safeobj.h"
-
-#if TNET_UNDER_WINDOWS && !TNET_USE_POLL
-
-/*== Socket description ==*/
-typedef struct transport_socket_s
-{
- tnet_fd_t fd;
- unsigned owner:1;
- unsigned connected:1;
- unsigned paused:1;
-
- tnet_socket_type_t type;
- tnet_tls_socket_handle_t* tlshandle;
-}
-transport_socket_t;
-
-/*== Transport context structure definition ==*/
-typedef struct transport_context_s
-{
- TSK_DECLARE_OBJECT;
-
- tsk_size_t count;
- WSAEVENT events[WSA_MAXIMUM_WAIT_EVENTS];
- transport_socket_t* sockets[WSA_MAXIMUM_WAIT_EVENTS];
-
- TSK_DECLARE_SAFEOBJ;
-}
-transport_context_t;
-
-static transport_socket_t* getSocket(transport_context_t *context, tnet_fd_t fd);
-static int addSocket(tnet_fd_t fd, tnet_socket_type_t type, tnet_transport_t *transport, int take_ownership, int is_client);
-static int removeSocket(int index, transport_context_t *context);
-
-/* Checks if socket is connected */
-int tnet_transport_isconnected(const tnet_transport_handle_t *handle, tnet_fd_t fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t *context;
- tsk_size_t i;
-
- if(!transport)
- {
- TSK_DEBUG_ERROR("Invalid server handle.");
- return 0;
- }
-
- context = (transport_context_t*)transport->context;
- for(i=0; i<context->count; i++)
- {
- const transport_socket_t* socket = context->sockets[i];
- if(socket->fd == fd){
- return socket->connected;
- }
- }
-
- return 0;
-}
-
-int tnet_transport_have_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return 0;
- }
-
- return (getSocket((transport_context_t*)transport->context, fd) != 0);
-}
-
-const tnet_tls_socket_handle_t* tnet_transport_get_tlshandle(const tnet_transport_handle_t *handle, tnet_fd_t fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_socket_t *socket;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return 0;
- }
-
- if((socket = getSocket((transport_context_t*)transport->context, fd))){
- return socket->tlshandle;
- }
- return 0;
-}
-
-/*
-* Add new socket to the watcher.
-*/
-int tnet_transport_add_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_socket_type_t type, tsk_bool_t take_ownership, tsk_bool_t isClient)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t* context;
- int ret = -1;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return ret;
- }
-
- if(!(context = (transport_context_t*)transport->context)){
- TSK_DEBUG_ERROR("Invalid context.");
- return -2;
- }
-
- if(TNET_SOCKET_TYPE_IS_TLS(type)){
- transport->tls.have_tls = 1;
- }
-
- addSocket(fd, type, transport, take_ownership, isClient);
- if(WSAEventSelect(fd, context->events[context->count - 1], FD_ALL_EVENTS) == SOCKET_ERROR){
- removeSocket((context->count - 1), context);
- TNET_PRINT_LAST_ERROR("WSAEventSelect have failed.");
- return -1;
- }
-
- /* Signal */
- if(WSASetEvent(context->events[0])){
- TSK_DEBUG_INFO("New socket added to the network transport.");
- return 0;
- }
-
- // ...
-
- return -1;
-}
-
-int tnet_transport_pause_socket(const tnet_transport_handle_t *handle, tnet_fd_t fd, tsk_bool_t pause)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t *context;
- transport_socket_t* socket;
-
- if(!transport || !(context = (transport_context_t*)transport->context)){
- TSK_DEBUG_ERROR("Invalid parameter");
- return -1;
- }
-
- if((socket = getSocket(context, fd))){
- socket->paused = pause;
- }
- else{
- TSK_DEBUG_WARN("Socket does not exist in this context");
- }
- return 0;
-}
-
-/* Remove socket
-*/
-int tnet_transport_remove_socket(const tnet_transport_handle_t *handle, tnet_fd_t* fd)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- transport_context_t *context;
- int ret = -1;
- tsk_size_t i;
- tsk_bool_t found = tsk_false;
-
- if(!transport || !(context = (transport_context_t*)transport->context)){
- TSK_DEBUG_ERROR("Invalid parameter");
- return -1;
- }
-
- for(i=0; i<context->count; i++){
- if(context->sockets[i]->fd == *fd){
- removeSocket(i, context);
- found = tsk_true;
- *fd = TNET_INVALID_FD;
- break;
- }
- }
-
- if(found){
- /* Signal */
- if(WSASetEvent(context->events[0])){
- TSK_DEBUG_INFO("Old socket removed from the network transport.");
- return 0;
- }
- }
-
- // ...
-
- return -1;
-}
-
-/*
-* Sends stream/dgram data to the remote peer (shall be previously connected using @tnet_transport_connectto).
-*/
-tsk_size_t tnet_transport_send(const tnet_transport_handle_t *handle, tnet_fd_t from, const void* buf, tsk_size_t size)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- int ret = -1;
- DWORD numberOfBytesSent = 0;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid transport handle.");
- goto bail;
- }
-
- if(transport->tls.have_tls){
- transport_socket_t* socket = getSocket(transport->context, from);
- if(socket && socket->tlshandle){
- if(!tnet_tls_socket_send(socket->tlshandle, buf, size)){
- numberOfBytesSent = size;
- }
- else{
- numberOfBytesSent = 0;
- }
- goto bail;
- }
- }
- else{
- WSABUF wsaBuffer;
- wsaBuffer.buf = (CHAR*)buf;
- wsaBuffer.len = size;
-
- if((ret = WSASend(from, &wsaBuffer, 1, &numberOfBytesSent, 0, NULL, NULL)) == SOCKET_ERROR){
- if((ret = WSAGetLastError()) == WSA_IO_PENDING){
- TSK_DEBUG_INFO("WSA_IO_PENDING error for WSASend SSESSION");
- ret = 0;
- }
- else{
- TNET_PRINT_LAST_ERROR("WSASend have failed.");
-
- //tnet_sockfd_close(&from);
- goto bail;
- }
- }
- else{
- ret = 0;
- }
- }
-
-bail:
- return numberOfBytesSent;
-}
-
-/*
-* Sends dgarm to the specified destionation.
-*/
-tsk_size_t tnet_transport_sendto(const tnet_transport_handle_t *handle, tnet_fd_t from, const struct sockaddr *to, const void* buf, tsk_size_t size)
-{
- tnet_transport_t *transport = (tnet_transport_t*)handle;
- WSABUF wsaBuffer;
- DWORD numberOfBytesSent = 0;
- int ret = -1;
-
- if(!transport){
- TSK_DEBUG_ERROR("Invalid server handle.");
- return ret;
- }
-
- if(!TNET_SOCKET_TYPE_IS_DGRAM(transport->master->type)){
- TSK_DEBUG_ERROR("In order to use WSASendTo you must use an udp transport.");
- return ret;
- }
-
- wsaBuffer.buf = (CHAR*)buf;
- wsaBuffer.len = size;
-
- if((ret = WSASendTo(from, &wsaBuffer, 1, &numberOfBytesSent, 0, to, tnet_get_sockaddr_size(to), 0, 0)) == SOCKET_ERROR){
- if((ret = WSAGetLastError()) == WSA_IO_PENDING){
- TSK_DEBUG_INFO("WSA_IO_PENDING error for WSASendTo SSESSION");
- ret = 0;
- }
- else{
- TNET_PRINT_LAST_ERROR("WSASendTo have failed.");
- return ret;
- }
- } else ret = 0;
-
- return numberOfBytesSent;
-}
-
-
-
-
-
-
-
-
-/*== CAllback function to check if we should accept the new socket or not == */
-int CALLBACK AcceptCondFunc(LPWSABUF lpCallerId, LPWSABUF lpCallerData, LPQOS lpSQos, LPQOS lpGQos, LPWSABUF lpCalleeId, LPWSABUF lpCalleeData, GROUP FAR *Group, DWORD CallbackData)
-{
- transport_context_t *context = (transport_context_t*)CallbackData;
- return context->count < WSA_MAXIMUM_WAIT_EVENTS ? CF_ACCEPT : CF_REJECT;
-}
-
-/*== Get socket ==*/
-static transport_socket_t* getSocket(transport_context_t *context, tnet_fd_t fd)
-{
- tsk_size_t i;
- transport_socket_t* ret = 0;
-
- if(context){
- tsk_safeobj_lock(context);
- for(i=0; i<context->count; i++){
- if(context->sockets[i]->fd == fd){
- ret = context->sockets[i];
- break;
- }
- }
- tsk_safeobj_unlock(context);
- }
-
- return ret;
-}
-
-/*== Add new socket ==*/
-static int addSocket(tnet_fd_t fd, tnet_socket_type_t type, tnet_transport_t *transport, int take_ownership, int is_client)
-{
- transport_context_t *context = transport?transport->context:0;
-
- if(context){
- transport_socket_t *sock = tsk_calloc(1, sizeof(transport_socket_t));
- sock->fd = fd;
- sock->type = type;
- sock->owner = take_ownership ? 1 : 0;
-
- if(TNET_SOCKET_TYPE_IS_TLS(sock->type)){
- sock->tlshandle = tnet_sockfd_set_tlsfiles(sock->fd, is_client, transport->tls.ca, transport->tls.pvk, transport->tls.pbk);
- }
-
- tsk_safeobj_lock(context);
- context->events[context->count] = WSACreateEvent();
- context->sockets[context->count] = sock;
-
- context->count++;
- tsk_safeobj_unlock(context);
-
- return 0;
- }
- else{
- TSK_DEBUG_ERROR("Context is Null.");
- return -1;
- }
-}
-
-/*== Remove socket ==*/
-static int removeSocket(int index, transport_context_t *context)
-{
- tsk_size_t i;
-
- tsk_safeobj_lock(context);
-
- if(index < (int)context->count){
-
- /* Close the socket if we are the owner. */
- if(context->sockets[index]->owner){
- tnet_sockfd_close(&(context->sockets[index]->fd));
- }
-
- /* Free tls context */
- if(context->sockets[index]->tlshandle){
- TSK_OBJECT_SAFE_FREE(context->sockets[index]->tlshandle);
- }
- // Free socket
- TSK_FREE(context->sockets[index]);
-
- // Close event
- WSACloseEvent(context->events[index]);
-
- for(i=index ; i<context->count-1; i++){
- context->sockets[i] = context->sockets[i+1];
- context->events[i] = context->events[i+1];
- }
-
- context->sockets[context->count-1] = 0;
- context->events[context->count-1] = 0;
-
- context->count--;
- }
-
- tsk_safeobj_unlock(context);
-
- return 0;
-}
-
-/*=== stop all threads */
-int tnet_transport_stop(tnet_transport_t *transport)
-{
- int ret;
-
- if((ret = tsk_runnable_stop(TSK_RUNNABLE(transport)))){
- return ret;
- }
-
- if(transport->mainThreadId[0]){
- WSASetEvent(((transport_context_t*)(transport->context))->events[0]);
- return tsk_thread_join(transport->mainThreadId);
- }
- else{
- /* already stoppped */
- return 0;
- }
-}
-
-
-int tnet_transport_prepare(tnet_transport_t *transport)
-{
- int ret = -1;
- transport_context_t *context;
-
- if(!transport || !transport->context){
- TSK_DEBUG_ERROR("Invalid parameter.");
- return -1;
- }
- else{
- context = transport->context;
- }
-
- if(transport->prepared){
- TSK_DEBUG_ERROR("Transport already prepared.");
- return -2;
- }
-
- /* Start listening */
- if(TNET_SOCKET_TYPE_IS_STREAM(transport->master->type)){
- if((ret = tnet_sockfd_listen(transport->master->fd, WSA_MAXIMUM_WAIT_EVENTS))){
- TNET_PRINT_LAST_ERROR("listen have failed.");
- goto bail;
- }
- }
-
- /* Add the master socket to the context. */
- if((ret = addSocket(transport->master->fd, transport->master->type, transport, tsk_true, tsk_false))){
- TSK_DEBUG_ERROR("Failed to add master socket");
- goto bail;
- }
-
- /* set events on master socket */
- if((ret = WSAEventSelect(transport->master->fd, context->events[context->count - 1], TNET_SOCKET_TYPE_IS_DGRAM(transport->master->type) ? FD_READ : FD_ALL_EVENTS/*FD_ACCEPT | FD_READ | FD_CONNECT | FD_CLOSE*/) == SOCKET_ERROR)){
- TNET_PRINT_LAST_ERROR("WSAEventSelect have failed.");
- goto bail;
- }
-
- transport->prepared = tsk_true;
-
-bail:
- return ret;
-}
-
-int tnet_transport_unprepare(tnet_transport_t *transport)
-{
- int ret = -1;
- transport_context_t *context;
-
- if(!transport || !transport->context){
- TSK_DEBUG_ERROR("Invalid parameter.");
- return -1;
- }
- else{
- context = transport->context;
- }
-
- if(!transport->prepared){
- return 0;
- }
-
- transport->prepared = tsk_false;
-
- while(context->count){
- removeSocket(0, context); // safe
- }
-
- return 0;
-}
-
-/*=== Main thread */
-void *tnet_transport_mainthread(void *param)
-{
- tnet_transport_t *transport = param;
- transport_context_t *context = transport->context;
- DWORD evt;
- WSANETWORKEVENTS networkEvents;
- DWORD flags = 0;
- int ret;
-
- struct sockaddr_storage remote_addr = {0};
- WSAEVENT active_event;
- transport_socket_t* active_socket;
- int index;
-
- TSK_DEBUG_INFO("Starting [%s] server with IP {%s} on port {%d}...", transport->description, transport->master->ip, transport->master->port);
-
- while(TSK_RUNNABLE(transport)->running || TSK_RUNNABLE(transport)->started)
- {
- /* Wait for multiple events */
- if((evt = WSAWaitForMultipleEvents(context->count, context->events, FALSE, WSA_INFINITE, FALSE)) == WSA_WAIT_FAILED){
- TNET_PRINT_LAST_ERROR("WSAWaitForMultipleEvents have failed.");
- goto bail;
- }
-
- if(!TSK_RUNNABLE(transport)->running && !TSK_RUNNABLE(transport)->started){
- goto bail;
- }
-
- /* lock context */
- tsk_safeobj_lock(context);
-
- /* Get active event and socket */
- index = (evt - WSA_WAIT_EVENT_0);
- active_event = context->events[index];
- if(!(active_socket = context->sockets[index])){
- goto done;
- }
-
- /* Get the network events flags */
- if (WSAEnumNetworkEvents(active_socket->fd, active_event, &networkEvents) == SOCKET_ERROR){
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- TNET_PRINT_LAST_ERROR("WSAEnumNetworkEvents have failed.");
-
- tsk_safeobj_unlock(context);
- goto bail;
- }
-
- /*================== FD_ACCEPT ==================*/
- if(networkEvents.lNetworkEvents & FD_ACCEPT)
- {
- tnet_fd_t fd;
-
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- FD_ACCEPT", transport->description);
-
- if(networkEvents.iErrorCode[FD_ACCEPT_BIT]){
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- TNET_PRINT_LAST_ERROR("ACCEPT FAILED.");
- goto done;
- }
-
- /* Accept the connection */
- if((fd = WSAAccept(active_socket->fd, NULL, NULL, AcceptCondFunc, (DWORD_PTR)context)) != INVALID_SOCKET){
- /* Add the new fd to the server context */
- addSocket(fd, transport->master->type, transport, tsk_true, tsk_false);
- if(WSAEventSelect(fd, context->events[context->count - 1], FD_READ | FD_WRITE | FD_CLOSE) == SOCKET_ERROR){
- removeSocket((context->count - 1), context);
- TNET_PRINT_LAST_ERROR("WSAEventSelect have failed.");
- goto done;
- }
- TSK_RUNNABLE_ENQUEUE(transport, event_accepted, transport->callback_data, fd);
- }
- else{
- TNET_PRINT_LAST_ERROR("ACCEPT FAILED.");
- goto done;
- }
-
-
-
-
- }
-
- /*================== FD_CONNECT ==================*/
- if(networkEvents.lNetworkEvents & FD_CONNECT)
- {
- //tnet_fd_t fd;
-
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- FD_CONNECT", transport->description);
-
- if(networkEvents.iErrorCode[FD_CONNECT_BIT]){
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- TNET_PRINT_LAST_ERROR("CONNECT FAILED.");
- goto done;
- }
- else{
- TSK_RUNNABLE_ENQUEUE(transport, event_connected, transport->callback_data, active_socket->fd);
- active_socket->connected = 1;
- }
- }
-
-
- /*================== FD_READ ==================*/
- if(networkEvents.lNetworkEvents & FD_READ)
- {
- DWORD readCount = 0;
- WSABUF wsaBuffer;
-
- /* TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- FD_READ", transport->description); */
-
- /* check whether the socket is paused or not */
- if(active_socket->paused){
- TSK_DEBUG_INFO("Socket is paused");
- goto FD_READ_DONE;
- }
-
- if(networkEvents.iErrorCode[FD_READ_BIT]){
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- TNET_PRINT_LAST_ERROR("READ FAILED.");
- goto done;
- }
-
- /* Retrieve the amount of pending data */
- if(tnet_ioctlt(active_socket->fd, FIONREAD, &(wsaBuffer.len)) < 0){
- TNET_PRINT_LAST_ERROR("IOCTLT FAILED.");
- goto done;
- }
-
- if(!wsaBuffer.len){
- goto done;
- }
-
- /* Alloc data */
- if(!(wsaBuffer.buf = tsk_calloc(wsaBuffer.len, sizeof(uint8_t)))){
- goto done;
- }
-
- /* Receive the waiting data. */
- if(active_socket->tlshandle){
- int isEncrypted;
- tsk_size_t len = wsaBuffer.len;
- if(!(ret = tnet_tls_socket_recv(active_socket->tlshandle, &wsaBuffer.buf, &len, &isEncrypted))){
- if(isEncrypted){
- TSK_FREE(wsaBuffer.buf);
- goto done;
- }
- wsaBuffer.len = len;
- }
- }
- else{
- if(TNET_SOCKET_TYPE_IS_STREAM(transport->master->type)){
- ret = WSARecv(active_socket->fd, &wsaBuffer, 1, &readCount, &flags, 0, 0);
- }
- else{
- int len = sizeof(remote_addr);
- ret = WSARecvFrom(active_socket->fd, &wsaBuffer, 1, &readCount, &flags,
- (struct sockaddr*)&remote_addr, &len, 0, 0);
- }
- if(readCount < wsaBuffer.len){
- wsaBuffer.len = readCount;
- /* wsaBuffer.buf = tsk_realloc(wsaBuffer.buf, readCount); */
- }
- }
-
- if(ret){
- ret = WSAGetLastError();
- if(ret == WSAEWOULDBLOCK){
- TSK_DEBUG_WARN("WSAEWOULDBLOCK error for READ SSESSION");
- }
- else if(ret == WSAECONNRESET && TNET_SOCKET_TYPE_IS_DGRAM(transport->master->type)){
- /* For DGRAM ==> The sent packet gernerated "ICMP Destination/Port unreachable" result. */
- TSK_FREE(wsaBuffer.buf);
- goto done; // ignore and retry.
- }
- else{
- TSK_FREE(wsaBuffer.buf);
-
- removeSocket(index, context);
- TNET_PRINT_LAST_ERROR("WSARecv have failed.");
- goto done;
- }
- }
- else
- {
- tnet_transport_event_t* e = tnet_transport_event_create(event_data, transport->callback_data, active_socket->fd);
- e->data = wsaBuffer.buf;
- e->size = wsaBuffer.len;
- e->remote_addr = remote_addr;
-
- TSK_RUNNABLE_ENQUEUE_OBJECT_SAFE(TSK_RUNNABLE(transport), e);
- }
-FD_READ_DONE:;
- }
-
-
-
-
- /*================== FD_WRITE ==================*/
- if(networkEvents.lNetworkEvents & FD_WRITE)
- {
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- FD_WRITE", transport->description);
-
- if(networkEvents.iErrorCode[FD_WRITE_BIT]){
- TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, active_socket->fd);
- TNET_PRINT_LAST_ERROR("WRITE FAILED.");
- goto done;
- }
- }
-
-
-
- /*================== FD_CLOSE ==================*/
- if(networkEvents.lNetworkEvents & FD_CLOSE){
- TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- FD_CLOSE", transport->description);
-
- TSK_RUNNABLE_ENQUEUE(transport, event_closed, transport->callback_data, active_socket->fd);
- removeSocket(index, context);
- }
-
- /* http://msdn.microsoft.com/en-us/library/ms741690(VS.85).aspx
-
- The proper way to reset the state of an event object used with the WSAEventSelect function
- is to pass the handle of the event object to the WSAEnumNetworkEvents function in the hEventObject parameter.
- This will reset the event object and adjust the status of active FD events on the socket in an atomic fashion.
- */
- /* WSAResetEvent(active_event); <== DO NOT USE (see above) */
-
-done:
- /* unlock context */
- tsk_safeobj_unlock(context);
-
- } /* while(transport->running) */
-
-
-bail:
-
-
- TSK_DEBUG_INFO("Stopped [%s] server with IP {%s} on port {%d}...", transport->description, transport->master->ip, transport->master->port);
- return 0;
-}
-
-
-
-
-tsk_object_t* tnet_transport_context_create()
-{
- return tsk_object_new(tnet_transport_context_def_t);
-}
-
-
-//=================================================================================================
-// Transport context object definition
-//
-static tsk_object_t* transport_context_ctor(tsk_object_t * self, va_list * app)
-{
- transport_context_t *context = self;
- if(context){
- tsk_safeobj_init(context);
- }
- return self;
-}
-
-static tsk_object_t* transport_context_dtor(tsk_object_t * self)
-{
- transport_context_t *context = self;
- if(context){
- while(context->count){
- removeSocket(0, context);
- }
- tsk_safeobj_deinit(context);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_transport_context_def_s =
-{
-sizeof(transport_context_t),
-transport_context_ctor,
-transport_context_dtor,
-tsk_null,
-};
-const tsk_object_def_t *tnet_transport_context_def_t = &tnet_transport_context_def_s;
-#endif /* TNET_UNDER_WINDOWS */
-
diff --git a/branches/1.0/tinyNET/src/tnet_types.h b/branches/1.0/tinyNET/src/tnet_types.h
deleted file mode 100644
index 8d08c0c..0000000
--- a/branches/1.0/tinyNET/src/tnet_types.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_types.h
- * @brief ????.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TYPES_H
-#define TNET_TYPES_H
-
-#include "tinynet_config.h"
-
-#if TNET_UNDER_WINDOWS
-# include <winsock2.h>
-# include <ws2tcpip.h>
-# include <iphlpapi.h>
-#else
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <sys/select.h>
-# include <netinet/in.h>
-# include <arpa/inet.h>
-# include <netdb.h>
-# include <fcntl.h>
-# include <sys/ioctl.h>
-# include <unistd.h>
-# include <net/if.h>
-# if HAVE_IFADDRS
-# include <ifaddrs.h>
-# endif
-# if TNET_HAVE_POLL
-# include <poll.h>
-# endif /* TNET_HAVE_POLL */
-#endif
-
-#if defined(TNET_HAVE_SCTP)
-#include <netinet/sctp.h>
-#endif
-
-#include "tsk_errno.h"
-#include "tsk_list.h"
-
-TNET_BEGIN_DECLS
-
-typedef int32_t tnet_fd_t;
-typedef uint16_t tnet_port_t;
-typedef int32_t tnet_family_t;
-typedef char tnet_host_t[NI_MAXHOST];
-typedef char tnet_ip_t[INET6_ADDRSTRLEN];
-
-typedef tsk_list_t tnet_interfaces_L_t; /**< List of @ref tnet_interface_t elements.*/
-typedef tsk_list_t tnet_addresses_L_t; /**< List of @ref tnet_address_t elements.*/
-
-#if TNET_UNDER_WINDOWS
-# define TNET_INVALID_SOCKET INVALID_SOCKET
-# define TNET_ERROR_WOULDBLOCK WSAEWOULDBLOCK
-# define TNET_ERROR_INPROGRESS WSAEINPROGRESS
-# define TNET_ERROR_CONNRESET WSAECONNRESET
-# define TNET_ERROR_INTR WSAEINTR
-# define TNET_ERROR_ISCONN WSAEISCONN
-# define TNET_ERROR_EAGAIN TNET_ERROR_WOULDBLOCK /* WinSock FIX */
-# if defined(_WIN32_WCE)
-# define tnet_gai_strerror(...) "FIXME"
-# else
-# define tnet_gai_strerror gai_strerrorA
-# endif
-#else
-# define TNET_INVALID_SOCKET -1
-# define TNET_ERROR_WOULDBLOCK EWOULDBLOCK
-# define TNET_ERROR_INPROGRESS EINPROGRESS
-# define TNET_ERROR_CONNRESET ECONNRESET
-# define TNET_ERROR_INTR EINTR
-# define TNET_ERROR_ISCONN EISCONN
-# define TNET_ERROR_EAGAIN EAGAIN
-# define tnet_gai_strerror gai_strerror
-#endif
-#define TNET_INVALID_FD TNET_INVALID_SOCKET
-
-#ifdef _WIN32_WCE
-typedef TCHAR tnet_error_t[512];
-#else
-typedef char tnet_error_t[512];
-#endif
-
-TNET_END_DECLS
-
-#endif /* TNET_TYPES_H */
-
-
diff --git a/branches/1.0/tinyNET/src/tnet_utils.c b/branches/1.0/tinyNET/src/tnet_utils.c
deleted file mode 100644
index 8f7338e..0000000
--- a/branches/1.0/tinyNET/src/tnet_utils.c
+++ /dev/null
@@ -1,1593 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_utils.c
- * @brief Network utility functions.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-
-#include "tnet_utils.h"
-
-#include "tsk_debug.h"
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-#include "tnet_socket.h"
-#include "tnet_endianness.h"
-#include "dns/tnet_dns_resolvconf.h"
-
-#include <string.h>
-
-/**@defgroup tnet_utils_group Network utility functions.
-*/
-
-
-/**@ingroup tnet_utils_group
-* Creates new @ref tnet_interface_t object.
-*/
-tnet_interface_t* tnet_interface_create(const char* description, const void* mac_address, tsk_size_t mac_address_length)
-{
- return tsk_object_new(tnet_interface_def_t, description, mac_address, mac_address_length);
-}
-
-/**@ingroup tnet_utils_group
-* Creates new @ref tnet_address_t object.
-*/
-tnet_address_t* tnet_address_create(const char* ip)
-{
- return tsk_object_new(tnet_address_def_t, ip);
-}
-
-/**@ingroup tnet_utils_group
- *
- * Gets last network error description.
- *
- * @param [out] error The short description of the last network error.
-**/
-void tnet_getlasterror(tnet_error_t *error)
-{
- int err = tnet_geterrno();
- memset(*error, 0, sizeof(*error));
-
-#if TNET_UNDER_WINDOWS
- {
-#ifdef _WIN32_WCE
- FormatMessage
-#else
- FormatMessageA
-#endif
- (
- FORMAT_MESSAGE_FROM_SYSTEM,
- tsk_null,
- err,
- 0,
- *error,
- sizeof(*error)-1,
- tsk_null);
- }
-#else
- strerror_r(err, *error, sizeof(*error));
- //sprintf(*error, "Network error (%d).", err);
-#endif
-}
-
-/**@ingroup tnet_utils_group
-* Gets last error number. Will call @a WSAGetLastError() on Windows and
-* errno on unix-like systems.
-* @retval Error number.
-*/
-int tnet_geterrno()
-{
-#if TNET_UNDER_WINDOWS
- return WSAGetLastError();
-#else
- return errno;
-#endif
-}
-
-
-/**@ingroup tnet_utils_group
- * Gets the list of all network interfaces/adapters.
- *
- * @retval Network interfaces.
-**/
-tnet_interfaces_L_t* tnet_get_interfaces()
-{
- tnet_interfaces_L_t * ifaces = tsk_list_create();
-
-#if TNET_UNDER_WINDOWS /*=== WINDOWS XP/VISTA/7/CE===*/
-
-#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
-#define FREE(x) HeapFree(GetProcessHeap(), 0, (x))
-
- PIP_ADAPTER_INFO pAdapterInfo = NULL;
- PIP_ADAPTER_INFO pAdapter = NULL;
- DWORD dwRetVal = 0;
-
- ULONG ulOutBufLen = sizeof (IP_ADAPTER_INFO);
- pAdapterInfo = (IP_ADAPTER_INFO *) MALLOC(sizeof (IP_ADAPTER_INFO));
- if(pAdapterInfo == NULL)
- {
- TSK_DEBUG_ERROR("Error allocating memory needed to call GetAdaptersinfo.");
- goto bail;
- }
- // Make an initial call to GetAdaptersInfo to get the necessary size into the ulOutBufLen variable
- if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW)
- {
- FREE(pAdapterInfo);
- pAdapterInfo = (IP_ADAPTER_INFO *) MALLOC(ulOutBufLen);
- if(pAdapterInfo == NULL)
- {
- TSK_DEBUG_ERROR("Error allocating memory needed to call GetAdaptersinfo.");
- goto bail;
- }
- }
-
- if ((dwRetVal = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen)) == NO_ERROR)
- {
- pAdapter = pAdapterInfo;
- while(pAdapter)
- {
- tnet_interface_t *iface;
-
- if(pAdapter->Type == MIB_IF_TYPE_LOOPBACK){
- continue;
- }
-
- iface = tnet_interface_create(pAdapter->Description, pAdapter->Address, pAdapter->AddressLength);
- iface->index = pAdapter->Index;
- tsk_list_push_back_data(ifaces, &(iface));
-
- pAdapter = pAdapter->Next;
- }
- }
-
- if(pAdapterInfo)
- {
- FREE(pAdapterInfo);
- }
-
-
-#undef MALLOC
-#undef FREE
-
-
-#elif HAVE_IFADDRS /*=== Using getifaddrs ===*/
-
- // see http://www.kernel.org/doc/man-pages/online/pages/man3/getifaddrs.3.html
- struct ifaddrs *ifaddr = tsk_null, *ifa = tsk_null;
-
- /* Get interfaces */
- if(getifaddrs(&ifaddr) == -1){
- TSK_DEBUG_ERROR("getifaddrs failed and errno= [%d]", tnet_geterrno());
- goto bail;
- }
-
- for(ifa = ifaddr; ifa; ifa = ifa->ifa_next){
- if(ifa->ifa_flags & IFF_LOOPBACK) {
- continue;
- }
-
- if(ifa->ifa_addr->sa_family != AF_LINK){
- continue;
- }
-
-#if defined(__linux__)
- {
- struct ifreq ifr;
- tnet_fd_t fd = TNET_INVALID_FD;
-
- if((fd = socket(AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP)) < 0){
- TSK_DEBUG_ERROR("Failed to create new DGRAM socket and errno= [%d]", tnet_geterrno());
- goto next;
- }
-
- ifr.ifr_addr.sa_family = ifa->ifa_addr->sa_family;
- strcpy(ifr.ifr_name, ifa.ifa_name);
- if(tnet_ioctl(fd, SIOCGIFHWADDR, &ifr)<0){
- TSK_DEBUG_ERROR("tnet_ioctl(SIOCGIFHWADDR)", tnet_geterrno());
- goto next;
- }
- else{
- //sockaddr_dl* sdl = (struct sockaddr_dl *)ifa->ifa_addr;
- tnet_interface_t *iface = tnet_interface_create(ifr->ifr_name, ifr->ifr_hwaddr.sa_data, 6);
- tsk_list_push_back_data(ifaces, (void**)&(iface));
- }
- next:
- tnet_sockfd_close(&fd);
- }
-#else
- {
- //struct sockaddr_dl* sdl = (struct sockaddr_dl*)ifa->ifa_addr;
- tnet_interface_t *iface = tnet_interface_create(ifa->ifa_name, ifa->ifa_addr, 6);
- iface->index = if_nametoindex(ifa->ifa_name);
- tsk_list_push_back_data(ifaces, (void**)&(iface));
- }
-#endif
-
- }/* for */
-
- freeifaddrs(ifaddr);
-
-#else /*=== ANDROID,... --> Using SIOCGIFCONF and SIOCGIFHWADDR ===*/
-
- tnet_fd_t fd = TNET_INVALID_FD;
- char buffer[1024];
- struct ifconf ifc;
-
- struct sockaddr_in *sin;
- struct ifreq *ifr;
-
- if((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0){
- TSK_DEBUG_ERROR("Failed to create new DGRAM socket and errno= [%d]", tnet_geterrno());
- goto done;
- }
-
- ifc.ifc_len = sizeof(buffer);
- ifc.ifc_buf = buffer;
-
- if(ioctl(fd, SIOCGIFCONF, &ifc) < 0){
- TSK_DEBUG_ERROR("ioctl(SIOCGIFCONF) failed and errno= [%d]", tnet_geterrno());
- goto done;
- }
-
- for(ifr = ifc.ifc_req; ifr && !tsk_strempty(ifr->ifr_name); ifr++){
- sin = (struct sockaddr_in *)&(ifr->ifr_addr);
- // TODO: IPAddress if needed
- if(/*ioctl(fd, SIOCGIFFLAGS, &ifr) == 0*/1){
- if (!(ifr->ifr_flags & IFF_LOOPBACK)){
- if(/*ioctl(fd, SIOCGIFHWADDR, &ifr) == 0*/1){
- tnet_interface_t *iface = tnet_interface_create(ifr->ifr_name, ifr->ifr_hwaddr.sa_data, 6);
- tsk_list_push_back_data(ifaces, (void**)&(iface));
- //iface->index = if_nametoindex(ifr->ifr_name);
- }
- }
- }
- else
- {
- TSK_DEBUG_ERROR("ioctl(SIOCGIFFLAGS) failed and errno= [%d]", tnet_geterrno());
- }
- }
-
-done:
- tnet_sockfd_close(&fd);
-
-
-#endif
-
-bail:
- return ifaces;
-}
-
-/**@ingroup tnet_utils_group
-* Get all IP addresses of the local machine.
-* @param family The @a family of the addresses to return.
-* @param unicast Indicates whether to return @a unicast addresses or not (1=yes and 0=no).
-* @param anycast Indicates whether to return @a anycast addresses or not (1=yes and 0=no).
-* @param multicast Indicates whether to return @a multicast addresses or not (1=yes and 0=no).
-* @param dnsserver Indicates whether to include dns servers or not (1=yes and 0=no).
-* @param if_index the index of the interface for which to to retrieve IP addresses.
-* -1 mean all interfaces.
-* @retval List of all addresses.
-*/
-tnet_addresses_L_t* tnet_get_addresses(tnet_family_t family, unsigned unicast, unsigned anycast, unsigned multicast, unsigned dnsserver, long if_index)
-{
- tnet_addresses_L_t *addresses = tsk_list_create();
-
-#if TSK_UNDER_WINDOWS
-
-#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
-#define FREE(x) HeapFree(GetProcessHeap(), 0, (x))
-
- /* Declare and initialize variables */
- tnet_ip_t ip;
- DWORD dwSize = 0;
- DWORD dwRetVal = 0;
-
- int i = 0;
-
- // Set the flags to pass to GetAdaptersAddresses
- ULONG flags = GAA_FLAG_INCLUDE_PREFIX;
-
- LPVOID lpMsgBuf = NULL;
-
- PIP_ADAPTER_ADDRESSES pAddresses = NULL;
- ULONG outBufLen = 0;
-
- PIP_ADAPTER_ADDRESSES pCurrAddresses = NULL;
- PIP_ADAPTER_UNICAST_ADDRESS pUnicast = NULL;
- PIP_ADAPTER_ANYCAST_ADDRESS pAnycast = NULL;
- PIP_ADAPTER_MULTICAST_ADDRESS pMulticast = NULL;
- IP_ADAPTER_DNS_SERVER_ADDRESS *pDnServer = NULL;
- IP_ADAPTER_PREFIX *pPrefix = NULL;
-
-
- outBufLen = sizeof(IP_ADAPTER_ADDRESSES);
- pAddresses = (IP_ADAPTER_ADDRESSES *) MALLOC(outBufLen);
-
- // Make an initial call to GetAdaptersAddresses to get the
- // size needed into the outBufLen variable
- if(GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen) == ERROR_BUFFER_OVERFLOW){
- FREE(pAddresses);
- pAddresses = (IP_ADAPTER_ADDRESSES *) MALLOC(outBufLen);
- }
- else goto bail;
-
- if(pAddresses == NULL){
- TSK_DEBUG_ERROR("Memory allocation failed for IP_ADAPTER_ADDRESSES struct.");
- goto bail;
- }
-
- dwRetVal = GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen);
-
- if(dwRetVal == NO_ERROR) {
- pCurrAddresses = pAddresses;
- while (pCurrAddresses){
- if((if_index != -1) && (pCurrAddresses->IfIndex != if_index && pCurrAddresses->Ipv6IfIndex != if_index)){
- goto next;
- }
-
- /* == UNICAST addresses == */
- pUnicast = pCurrAddresses->FirstUnicastAddress;
- while(unicast && pUnicast){
- //memset(ip, '\0', sizeof(ip));
- tnet_get_sockip(pUnicast->Address.lpSockaddr, &ip);
- {
- tnet_address_t *address = tnet_address_create(ip);
- address->family = pUnicast->Address.lpSockaddr->sa_family;
- address->unicast = 1;
- tsk_list_push_ascending_data(addresses, &address);
- }
-
- pUnicast = pUnicast->Next;
- }
-
- /* == ANYCAST addresses == */
- pAnycast = pCurrAddresses->FirstAnycastAddress;
- while(anycast && pAnycast){
- //memset(ip, '\0', sizeof(ip));
- tnet_get_sockip(pAnycast->Address.lpSockaddr, &ip);
- {
- tnet_address_t *address = tnet_address_create(ip);
- address->family = pAnycast->Address.lpSockaddr->sa_family;
- address->anycast = 1;
- tsk_list_push_ascending_data(addresses, &address);
- }
-
- pAnycast = pAnycast->Next;
- }
-
- /* == MULTYCAST addresses == */
- pMulticast = pCurrAddresses->FirstMulticastAddress;
- while(multicast && pMulticast){
- //memset(ip, '\0', sizeof(ip));
- tnet_get_sockip(pMulticast->Address.lpSockaddr, &ip);
- {
- tnet_address_t *address = tnet_address_create(ip);
- address->family = pMulticast->Address.lpSockaddr->sa_family;
- address->multicast = 1;
- tsk_list_push_ascending_data(addresses, &address);
- }
-
- pMulticast = pMulticast->Next;
- }
-
- /* == DNS servers == */
- pDnServer = pCurrAddresses->FirstDnsServerAddress;
- while(dnsserver && pDnServer){
- //memset(ip, '\0', sizeof(ip));
- if(!tnet_get_sockip(pDnServer->Address.lpSockaddr, &ip)){
- tnet_address_t *address = tnet_address_create(ip);
- address->family = pDnServer->Address.lpSockaddr->sa_family;
- address->dnsserver = 1;
- tsk_list_push_ascending_data(addresses, &address);
- }
-
- pDnServer = pDnServer->Next;
- }
-next:
- pCurrAddresses = pCurrAddresses->Next;
- }
- }
-
- if(pAddresses){
- FREE(pAddresses);
- }
-
-#undef MALLOC
-#undef FREE
-
-bail:
-
-#else /* !TSK_UNDER_WINDOWS (MAC OS X, UNIX, ANDROID ...) */
-
-#if HAVE_IFADDRS /*=== Using getifaddrs ===*/
-
- // see http://www.kernel.org/doc/man-pages/online/pages/man3/getifaddrs.3.html
- struct ifaddrs *ifaddr = 0, *ifa = 0;
- struct sockaddr *addr;
- tnet_ip_t ip;
-
- /* Get interfaces */
- if(getifaddrs(&ifaddr) == -1){
- TSK_DEBUG_ERROR("getifaddrs failed and errno= [%d]", tnet_geterrno());
- goto bail;
- }
-
- /* == Unicast addresses == */
- for(ifa = ifaddr; ifa; ifa = ifa->ifa_next){
- // Skip loopback
- if (ifa->ifa_flags & IFF_LOOPBACK) {
- continue;
- }
-
- // Skip unwanted interface
- if (if_index != -1 && if_nametoindex(ifa->ifa_name) != if_index) {
- continue;
- }
-
- // Only deal with Unicast address
- if (unicast) {
- if (family == AF_INET && ifa->ifa_addr->sa_family != AF_INET) {
- continue;
- }
- if (family == AF_INET6 && ifa->ifa_addr->sa_family != AF_INET6) {
- continue;
- }
- if (ifa->ifa_addr->sa_family != AF_INET && ifa->ifa_addr->sa_family != AF_INET6) {
- continue;
- }
-
- // Get the IP string
- addr = (struct sockaddr *) ifa->ifa_addr;
- tnet_get_sockip(addr, &ip);
-
- // Push a new address
- tnet_address_t *address = tnet_address_create(ip);
- address->family = ifa->ifa_addr->sa_family;
- address->unicast = 1;
- tsk_list_push_ascending_data(addresses, (void **) &address);
- }
- }
-
- if (ifaddr) {
- free(ifaddr);
- }
-
-#endif /* HAVE_IFADDRS */
-
-bail:
-
- /* == DNS servers == */
- if(dnsserver){
- tnet_addresses_L_t * dns_servers;
- if((dns_servers = tnet_dns_resolvconf_parse("/etc/resolv.conf"))){
- tsk_list_pushback_list(addresses, dns_servers);
- TSK_OBJECT_SAFE_FREE(dns_servers);
- }
- }
-
-#endif
-
- return addresses;
-}
-
-#if defined(__APPLE__)
-
-#include <net/if_dl.h>
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_2
-#include "net/route.h"
-#else
-#include <net/route.h>
-#endif
-
-#endif
-
-/**@ingroup tnet_utils_group
-* Retrieves the @a source IP address that has the best route to the specified IPv4 or IPv6 @a destination.
-* @param destination The destination address.
-* @param port The destination port.
-* @param type The socket type.
-* @param source The best @a source.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_getbestsource(const char* destination, tnet_port_t port, tnet_socket_type_t type, tnet_ip_t *source)
-{
- int ret = -1;
- struct sockaddr_storage destAddr;
-
-#if TNET_UNDER_WINDOWS
- long dwBestIfIndex = -1;
-#endif
-
- if(!destination || !source){
- TSK_DEBUG_ERROR("Invalid parameter");
- goto bail;
- }
-
- if((ret = tnet_sockaddr_init(destination, port, type, &destAddr))){
- goto bail;
- }
-
-#if TNET_UNDER_WINDOWS /* Windows XP/Vista/7 and Windows Mobile */
- if(GetBestInterfaceEx((struct sockaddr*)&destAddr, &dwBestIfIndex) != NO_ERROR){
- ret = tnet_geterrno();
- TNET_PRINT_LAST_ERROR("GetBestInterfaceEx() failed.");
- goto bail;
- }
- else{
- tnet_addresses_L_t* addresses = tsk_null;
- const tsk_list_item_t* item;
-
- if(!(addresses = tnet_get_addresses(TNET_SOCKET_TYPE_IS_IPV6(type) ? AF_INET6 : AF_INET, tsk_true, tsk_false, tsk_false, tsk_false, dwBestIfIndex))){
- ret = -2;
- TSK_DEBUG_ERROR("Failed to retrieve addresses.");
- goto bail;
- }
-
- tsk_list_foreach(item, addresses){
- const tnet_address_t* address = item->data;
- if(address && address->ip){
- memset(*source, '\0', sizeof(*source));
- memcpy(*source, address->ip, tsk_strlen(address->ip) > sizeof(*source) ? sizeof(*source) : tsk_strlen(address->ip));
- ret = 0;
- break; // First is good for us.
- }
- }
- TSK_OBJECT_SAFE_FREE(addresses);
- }
-#elif defined(__APPLE__) /* Mac OS X, iPhone, iPod Touch and iPad */
- /* Thanks to Laurent Etiemble */
-
- static int seq = 1234;
- char buf[1024];
- char *cp;
- int s, i, l, rlen;
- int pid = getpid();
- u_long rtm_inits;
- struct rt_metrics rt_metrics;
- struct sockaddr_storage so_dst = destAddr;
- struct sockaddr_dl so_ifp;
- struct sockaddr *sa = NULL;
- struct sockaddr_dl *ifp = NULL;
- struct rt_msghdr *rtm = (struct rt_msghdr *)buf;
- struct ifaddrs *ifaddr = 0, *ifa = 0;
- tnet_ip_t ip;
-
- bzero(rtm, 1024);
- cp = (char *)(rtm + 1);
-
- so_ifp.sdl_index = 0;
- so_ifp.sdl_family = AF_LINK;
- so_ifp.sdl_len = sizeof(struct sockaddr_dl);
-
- rtm->rtm_type = RTM_GET;
- rtm->rtm_flags = RTF_STATIC | RTF_UP | RTF_GATEWAY;
- rtm->rtm_version = RTM_VERSION;
- rtm->rtm_seq = ++seq;
- rtm->rtm_addrs = RTA_DST | RTA_IFP;
- rtm->rtm_rmx = rt_metrics;
- rtm->rtm_inits = rtm_inits;
- rtm->rtm_index = 0;
-
- /** Roundup value to a 4 bytes boundary. */
-#define ROUNDUP(a) \
-((a) > 0 ? (1 + (((a) - 1) | (sizeof(uint32_t) - 1))) : sizeof(uint32_t))
-
- l = ROUNDUP(so_dst.ss_len);
- memcpy(&so_dst, cp, l);
- cp += l;
-
- l = ROUNDUP(so_ifp.sdl_len);
- memcpy(&so_ifp, cp, l);
- cp += l;
-
- l = cp - buf;
- rtm->rtm_msglen = l;
-
- s = socket(PF_ROUTE, SOCK_RAW, 0);
- if (s < 0) {
- // TODO
- }
-
- if ((rlen = write(s, rtm, l)) < 0) {
- printf("writing to routing socket");
- // TODO
- }
- do {
- l = read(s, rtm, 1024);
- } while (l > 0 && (rtm->rtm_seq != seq || rtm->rtm_pid != pid));
-
- /** Advance an address to the closest 4 bytes boundary. */
-#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
-
- if (rtm->rtm_errno == 0 && rtm->rtm_addrs) {
- cp = (char *)(rtm + 1);
- for (i = 1; i; i <<= 1) {
- if (i & rtm->rtm_addrs) {
- sa = (struct sockaddr *)cp;
- switch (i) {
- case RTA_IFP:
- ifp = (struct sockaddr_dl *) sa;
- break;
- }
- ADVANCE(cp, sa);
- }
- }
- }
-
- if (ifp) {
- printf(" interface: %.*s\n", ifp->sdl_nlen, ifp->sdl_data);
-
- /* Get interfaces */
- if(getifaddrs(&ifaddr) == -1){
- TNET_PRINT_LAST_ERROR("getifaddrs() failed.");
- goto bail;
- }
-
- for(ifa = ifaddr; ifa; ifa = ifa->ifa_next){
- if (ifa->ifa_flags & IFF_LOOPBACK) {
- continue;
- }
-
- if (if_nametoindex(ifa->ifa_name) != ifp->sdl_index) {
- continue;
- }
-
- if (ifa->ifa_addr->sa_family != destAddr.ss_family) {
- continue;
- }
-
- if (destAddr.ss_family == AF_INET6) {
- if (IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *) ifa->ifa_addr)->sin6_addr) ^
- IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *) &destAddr)->sin6_addr)) {
- continue;
- }
- if (IN6_IS_ADDR_SITELOCAL(&((struct sockaddr_in6 *) ifa->ifa_addr)->sin6_addr) ^
- IN6_IS_ADDR_SITELOCAL(&((struct sockaddr_in6 *) &destAddr)->sin6_addr)) {
- continue;
- }
- }
-
- tnet_get_sockip((struct sockaddr *) ifa->ifa_addr, &ip);
-
- memset(*source, '\0', sizeof(*source));
- memcpy(*source, ip, tsk_strlen(ip) > sizeof(*source) ? sizeof(*source) : tsk_strlen(ip));
- ret = 0;
- goto bail; // First is good for us.
- }
- }
-
-#else /* All other systems (Google Android, Unix-Like systems, uLinux, ....) */
-
-
-#endif
-
-bail:
- return ret;
-}
-
-
-/**@ingroup tnet_utils_group
- *
- * Converts human-readable text strings representing hostnames or IP addresses into a dynamically allocated linked list of struct addrinfo structures.
- * You MUST call @ref tnet_freeaddrinfo() function to free the result.
- *
- * @param [in] node A pointer to a NULL-terminated ANSI string that contains a host (node) name or a numeric host address string. For the Internet protocol, the numeric host address string is a dotted-decimal IPv4 address or an IPv6 hex address..
- * @param [in] service A pointer to a NULL-terminated ANSI string that contains either a service name or port number represented as a string.
- * @param [in] hints A pointer to an addrinfo structure that provides hints about the type of socket the caller supports.
- * @param [out] res A pointer to a linked list of one or more addrinfo structures that contains response information about the host.
- *
- * @retval Success returns zero. Failure returns a nonzero error code.
-**/
-int tnet_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
-{
- int ret = -1;
- if(hints && (ret = getaddrinfo(node, service, hints, res))){
- TSK_DEBUG_ERROR("getaddrinfo(family=%d, node=%s and service=%s) failed: [%s]", hints->ai_family, node, service, tnet_gai_strerror(ret));
- }
- return ret;
-}
-
-/**@ingroup tnet_utils_group
- *
- * This function frees address information previously allocated using @ref tnet_getaddrinfo.
- *
- * @param [in] ai The address information to free.
-**/
-void tnet_freeaddrinfo(struct addrinfo *ai)
-{
- if(ai){
- freeaddrinfo(ai);
- }
-}
-
-/**@ingroup tnet_utils_group
-* Converts a descriptor to @b sockaddr_storage structure.
-* @param fd The descriptor to convert.
-* @param result @b sockaddr_storage structre representing the desciptor.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_get_sockaddr(tnet_fd_t fd, struct sockaddr_storage *result)
-{
- if(fd >0){
- socklen_t namelen = sizeof(*result);
- return getsockname(fd, (struct sockaddr*)result, &namelen);
- }
- return -1;
-}
-
-/**@ingroup tnet_utils_group
-* Retrieves the socket type of a File Descriptor.
-* @param fd The File descriptor for which to retrive the type.
-* @retval @ref tnet_socket_type_t.
-*/
-tnet_socket_type_t tnet_get_socket_type(tnet_fd_t fd)
-{
- tnet_socket_type_t type = tnet_socket_type_invalid;
-
- /*if(fd >0)
- {
- struct sockaddr_storage ss;
- if(!tnet_get_sockaddr(fd, &ss))
- {
- if(((struct sockaddr *)&ss)->sa_family == AF_INET)
- {
- TNET_SOCKET_TYPE_AS_IPV4(type);
- }
- else if(((struct sockaddr *)&ss)->sa_family == AF_INET6)
- {
- TNET_SOCKET_TYPE_AS_IPV6(type);
- }
- }
- }*/
-
- return type;
-}
-
-/**@ingroup tnet_utils_group
-* Gets the IP family of the @a host (e.g. "google.com" or "192.168.16.104" or "::1").
-* If the @a host is FQDN associated with both IPv4 and IPv6 then the result is unpredictable.
-* @param host The IP address or hostname for which to get the IP family.
-* @param port The port associated to the @a host. Will be used as the default service.
-* @retval @a AF_* if succeed and @a AF_UNSPEC otherwise.
-*/
-tnet_family_t tnet_get_family(const char* host, tnet_port_t port)
-{
- tnet_family_t ret = AF_UNSPEC;
- if(host){
- int status;
- tsk_istr_t srv;
- struct addrinfo *result = tsk_null;
- struct addrinfo hints;
-
- /* set the port: used as the default service */
- if(port){
- tsk_itoa(port, &srv);
- }
- else{
- memset(srv, '\0', sizeof(srv));
- }
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_DGRAM;
- hints.ai_protocol = IPPROTO_UDP;
-
- if((status = tnet_getaddrinfo(host, srv, &hints, &result))){
- TNET_PRINT_LAST_ERROR("getaddrinfo failed:");
- goto done;
- }
-
- /* Get the First result. */
- if(result){
- ret = result->ai_family;
- goto done;
- }
-done:
- freeaddrinfo(result);
- }
-
- return ret;
-}
-
-/**@ingroup tnet_utils_group
-* Gets the IP address and the Port of a @b sockaddr object.
-* @param addr [in] A pointer to @b sockaddr structure for which to retrieve the IP address and port.
-* @param ip [out] The IP address.
-* @param port [out] The port.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_get_sockip_n_port(struct sockaddr *addr, tnet_ip_t *ip, tnet_port_t *port)
-{
- int status = -1;
-
- if(addr->sa_family == AF_INET){
- struct sockaddr_in *sin = (struct sockaddr_in *)addr;
- if(port){
- *port = tnet_ntohs(sin->sin_port);
- status = 0;
- }
- if(ip){
- if((status = tnet_getnameinfo((struct sockaddr*)sin, sizeof(*sin), *ip, sizeof(*ip), 0, 0, NI_NUMERICHOST))){
- return status;
- }
- }
- }
- else if(addr->sa_family == AF_INET6)
- {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)addr;
-#if TNET_UNDER_WINDOWS
- int index;
-#endif
- if(port){
- *port = tnet_ntohs(sin6->sin6_port);
- status = 0;
- }
- if(ip){
- if((status = tnet_getnameinfo((struct sockaddr*)sin6, sizeof(*sin6), *ip, sizeof(*ip), 0, 0, NI_NUMERICHOST))){
- return status;
- }
-
-#if TNET_UNDER_WINDOWS
- if((index = tsk_strindexOf(*ip, tsk_strlen(*ip), "%")) > 0){
- *(*ip + index) = '\0';
- }
-#endif
- }
- }
- else
- {
- TSK_DEBUG_ERROR("Unsupported address family.");
- return status;
- }
-
- return status;
-}
-
-/**@ingroup tnet_utils_group
-* Gets the IP address and port of the remote peer.
-* <b>The socket MUST be connect()ed.</b>
-* @param localFD Local socket.
-* @param ip [out] The IP address of the remote peer.
-* @param port [out] The remote (peer) port.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_get_peerip_n_port(tnet_fd_t localFD, tnet_ip_t *ip, tnet_port_t *port)
-{
- if(port){
- *port = 0;
- }
-
- if(localFD > 0){
- int status;
- socklen_t len;
- struct sockaddr_storage ss;
-
- len = sizeof(ss);
- if((status = getpeername(localFD, (struct sockaddr *)&ss, &len))){
- TSK_DEBUG_ERROR("TNET_GET_SOCKADDR has failed with status code: %d", status);
- return -1;
- }
-
- return tnet_get_sockip_n_port(((struct sockaddr *)&ss), ip, port);
- }
-
- TSK_DEBUG_ERROR("Could not use an invalid socket description.");
- return -1;
-}
-
-/**@ingroup tnet_utils_group
-* Gets the IP address and the Port of a local socket (File descriptor).
-* @param fd The decriptor for which to retrive the IP address and port.
-* @param ip [out] The IP address of the local socket.
-* @param port [out] The port of the local socket.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_get_ip_n_port(tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)
-{
- if(port){
- *port = 0;
- }
-
- if(fd > 0){
- int status;
- struct sockaddr_storage ss;
- if((status = tnet_get_sockaddr(fd, &ss))){
- TSK_DEBUG_ERROR("TNET_GET_SOCKADDR has failed with status code: %d", status);
- return -1;
- }
-
- return tnet_get_sockip_n_port(((struct sockaddr *)&ss), ip, port);
- }
-
- TSK_DEBUG_ERROR("Could not use an invalid socket description.");
- return -1;
-}
-
-/**@ingroup tnet_utils_group
-* Provides protocol-independent name resolution from an address to an ANSI host name and from a port number to the ANSI service name.
-* @param sa A pointer to a socket address structure that contains the address and port number of the socket. For IPv4, the sa parameter points to a sockaddr_in structure. For IPv6, the sa parameter points to a @b sockaddr_in6 structure.
-* @param salen The length, in bytes, of the structure pointed to by the sa parameter.
-* @param node A pointer to an ANSI string used to hold the host name. On success, a pointer to the host name is returned as a Fully Qualified Domain Name (FQDN) by default. If the host parameter is NULL, this indicates the caller does not want to receive a host name string.
-* @param nodelen The length, in bytes, of the buffer pointed to by the host parameter. The caller must provide a buffer large enough to hold the host name, including the terminating NULL character.
-* @param service A pointer to an ANSI string to hold the service name. On success, a pointer is returned to an ANSI string that represents the service name associated with the port number. If the serv parameter is NULL, this indicates the caller does not want to receive a service name string.
-* @param servicelen The length, in bytes, of the buffer pointed to by the serv parameter. The caller must provide a buffer large enough to hold the service name, including the terminating NULL character.
-* @param flags A value used to customize processing of the @b getnameinfo function. See the Remarks section.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_getnameinfo(const struct sockaddr *sa, socklen_t salen, char* node, socklen_t nodelen, char* service, socklen_t servicelen, int flags)
-{
- return getnameinfo(sa, salen, node, nodelen, service, servicelen, flags);
-}
-
-/**@ingroup tnet_utils_group
-* Retrieves the standard host name for the local computer.
-* @param result A pointer to a buffer that receives the local host name.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_gethostname(tnet_host_t* result)
-{
- return gethostname(*result, sizeof(*result));
-}
-
-/**@ingroup tnet_utils_group
-* Waits until the socket becomes writable/readable or @a timeout milliseconds passed.
-* This function could be used just after you have @a connect()ed a non-blocking socket.
-* @param fd The socket for which to check writability/readability.
-* @param timeout The number of milliseconds to wait. The function will immediately return if the socket
-* is already connected and writable/readable. Set the @a timeout value to -1 to wait indefinitely.
-* @param writable Indicates whether to wait for writability or readability.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_sockfd_waitUntil(tnet_fd_t fd, long timeout, tsk_bool_t writable)
-{
- int ret = -1;
- fd_set fds;
- struct timeval timetowait;
-
- if(fd<=0){
- goto bail;
- }
-
- if(timeout >=0){
- timetowait.tv_sec = (timeout/1000);
- timetowait.tv_usec = (timeout%1000) * 1000;
- }
-
- FD_ZERO(&fds);
- FD_SET(fd, &fds);
-
- ret = select(fd + 1, writable?0:&fds, writable?&fds:0, 0, (timeout >=0) ? &timetowait : 0);
-
- if(ret == 0){ /* timedout */
- ret = -2;
- }
- else if(ret == 1/* the total number of socket handles that are ready */){
- ret = 0; // Ok
- }
- //else: error
-
-bail:
- return ret;
-}
-
-/**@ingroup tnet_utils_group
-* NOT IMPLEMENTED.
-*/
-int tnet_sockfd_joingroup6(tnet_fd_t fd, const char* multiaddr, unsigned iface_index)
-{
- int ret = -1;
- //struct ipv6_mreq mreq6;
- //struct sockaddr_storage ss;
-
- //if((ret = tnet_sockaddr_init(multiaddr, 0, tnet_socket_type_udp_ipv6, &ss)))
- //{
- // return ret;
- //}
-
- //memcpy(&mreq6.ipv6mr_multiaddr, &((struct sockaddr_in6 *) &ss)->sin6_addr, sizeof(struct in6_addr));
- //mreq6.ipv6mr_interface = iface_index;
-
- //if((ret = setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char*)&mreq6, sizeof(mreq6))))
- //{
- // TNET_PRINT_LAST_ERROR("Failed to join IPv6 multicast group.");
- // return ret;
- //}
-
- return ret;
-}
-/**@ingroup tnet_utils_group
-* NOT IMPLEMENTED.
-*/
-int tnet_sockfd_leavegroup6(tnet_fd_t fd, const char* multiaddr, unsigned iface_index)
-{
- //if(multiaddr)
- {
- }
- return -1;
-}
-
-/**@ingroup tnet_utils_group
-* Converts human-readable text strings representing hostnames or IP addresses into a dynamically allocated linked list of struct addrinfo structures.
-*/
-int tnet_sockaddrinfo_init(const char *host, tnet_port_t port, enum tnet_socket_type_e type, struct sockaddr_storage *ai_addr, int *ai_family, int *ai_socktype, int *ai_protocol)
-{
- int status = 0;
- struct addrinfo *result = 0;
- struct addrinfo *ptr = 0;
- struct addrinfo hints;
- tsk_istr_t p;
-
- tsk_itoa(port, &p);
-
- /* hints address info structure */
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = TNET_SOCKET_TYPE_IS_IPV46(type) ? AF_UNSPEC : (TNET_SOCKET_TYPE_IS_IPV6(type) ? AF_INET6 : AF_INET);
- hints.ai_socktype = TNET_SOCKET_TYPE_IS_STREAM(type) ? SOCK_STREAM : SOCK_DGRAM;
- hints.ai_protocol = TNET_SOCKET_TYPE_IS_STREAM(type) ? IPPROTO_TCP : IPPROTO_UDP;
- hints.ai_flags = AI_PASSIVE;
-
- /* Performs getaddrinfo */
- if((status = tnet_getaddrinfo(host, p, &hints, &result))){
- TNET_PRINT_LAST_ERROR("getaddrinfo have failed.");
- goto bail;
- }
-
- /* Find our address. */
- for(ptr = result; ptr; ptr = ptr->ai_next){
- /* Only IPv4 and IPv6 are supported */
- if(ptr->ai_family != AF_INET6 && ptr->ai_family != AF_INET){
- continue;
- }
- /* duplicate addrinfo ==> Bad idea
- *ai = tsk_calloc(1, sizeof (struct addrinfo));
- memcpy (*ai, ptr, sizeof (struct addrinfo));
- (*ai)->ai_addr = tsk_calloc(1, ptr->ai_addrlen);
- memcpy((*ai)->ai_addr, ptr->ai_addr, ptr->ai_addrlen);
- (*ai)->ai_addrlen = ptr->ai_addrlen;
- (*ai)->ai_next = 0;
- (*ai)->ai_canonname = 0;*/
-
- if(ai_addr)memcpy(ai_addr, ptr->ai_addr, ptr->ai_addrlen);
- if(ai_family) *ai_family = ptr->ai_family;
- if(ai_socktype) *ai_socktype = ptr->ai_socktype;
- if(ai_protocol) *ai_protocol = ptr->ai_protocol;
-
- /* We prefer IPv4 but IPv6 can also work */
- if(ptr->ai_family == AF_INET){
- break;
- }
- }
-
-bail:
- tnet_freeaddrinfo(result);
-
- return status;
-}
-
-/**@ingroup tnet_utils_group
-* Converts human-readable text strings representing hostnames or IP addresses into a @b sockaddr_storage structure.
-* @param host The hostname/IP address to convert.
-* @param port The local port associated to the host.
-* @param type The type of the socket to create.
-* @param addr [out] @b sockaddr_storage structure representing the @a host:port address.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_sockaddr_init(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *addr)
-{
- int status;
- struct sockaddr_storage ai_addr;
-
- if((status = tnet_sockaddrinfo_init(host, port, type, &ai_addr, 0, 0, 0))){
- return status;
- }
-
- memcpy(addr, &ai_addr, sizeof(ai_addr));
-
- return status;
-}
-
-/**@ingroup tnet_utils_group
-* Converts human-readable text strings representing hostnames or IP addresses as socket (File descriptor).
-* @param host The hostname/IP address to convert.
-* @param port The local port associated to the host.
-* @param type The type of the socket to create.
-* @param fd [out] The socket representing the @a host:port address.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_sockfd_init(const char *host, tnet_port_t port, enum tnet_socket_type_e type, tnet_fd_t *fd)
-{
- int status = -1;
- struct sockaddr_storage ai_addr;
- int ai_family, ai_socktype, ai_protocol;
- *fd = TNET_INVALID_SOCKET;
-
- if((status = tnet_sockaddrinfo_init(host, port, type, &ai_addr, &ai_family, &ai_socktype, &ai_protocol))){
- goto bail;
- }
-
- if((*fd = socket(ai_family, ai_socktype, ai_protocol)) == TNET_INVALID_SOCKET){
- TNET_PRINT_LAST_ERROR("Failed to create new socket.");
- goto bail;
- }
-
-#if TNET_USE_POLL /* For win32 WSA* function the socket is auto. set to nonblocking mode. */
- if((status = tnet_sockfd_set_nonblocking(*fd))){
- goto bail;
- }
-#endif
-
-#if TNET_HAVE_SS_LEN
- if((status = bind(*fd, (const struct sockaddr*)&ai_addr, ai_addr.ss_len)))
-#else
- if((status = bind(*fd, (const struct sockaddr*)&ai_addr, sizeof(ai_addr))))
-#endif
- {
- TNET_PRINT_LAST_ERROR("bind have failed.");
- tnet_sockfd_close(fd);
-
- goto bail;
- }
-
-bail:
- return (*fd == TNET_INVALID_SOCKET) ? status : 0;
-}
-
-/**@ingroup tnet_utils_group
-* Changes the blocking mode of the socket.
-* @param fd The socket for which to change to mode.
-* @param nonBlocking The new mode (0 =blocking and 1=non-blocking).
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_sockfd_set_mode(tnet_fd_t fd, int nonBlocking)
-{
- if(fd != TNET_INVALID_FD)
- {
-#if TNET_UNDER_WINDOWS
- ULONG mode = nonBlocking;
- if(ioctlsocket(fd, FIONBIO, &mode))
- //if(WSAIoctl(fd, FIONBIO, &nonblocking, sizeof(nonblocking), NULL, 0, NULL, NULL, NULL) == SOCKET_ERROR)
- {
- TNET_PRINT_LAST_ERROR("ioctlsocket(FIONBIO) have failed.");
- return -1;
- }
-#else
- int flags;
- if((flags = fcntl(fd, F_GETFL, 0)) < 0) {
- TNET_PRINT_LAST_ERROR("fcntl(F_GETFL) have failed.");
- return -1;
- }
- if(fcntl(fd, F_SETFL, flags | (nonBlocking ? O_NONBLOCK : ~O_NONBLOCK)) < 0){
- TNET_PRINT_LAST_ERROR("fcntl(O_NONBLOCK/O_NONBLOCK) have failed.");
- return -1;
- }
-#endif
-
- // int on = 1;
- // ioctl(fd, FIONBIO, (char *)&on);
-
- }
- return 0;
-}
-
-tnet_tls_socket_handle_t* tnet_sockfd_set_tlsfiles(tnet_fd_t fd, int isClient, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk)
-{
- tnet_tls_socket_handle_t* tlshandle = 0;
- if(fd == TNET_INVALID_FD){
- return 0;
- }
-
- if(isClient){
- tlshandle = tnet_tls_socket_client_create(fd, tlsfile_ca, tlsfile_pvk, tlsfile_pbk);
- }
- else{
- tlshandle = tnet_tls_socket_server_create(fd, tlsfile_ca, tlsfile_pvk, tlsfile_pbk);
- }
-
- if(tnet_tls_socket_isok(tlshandle)){
- return tlshandle;
- }
- else{
- TSK_OBJECT_SAFE_FREE(tlshandle);
- return 0;
- }
-}
-
-/**@ingroup tnet_utils_group
-* Sends data to a specific destination.
-* @param fd The source socket.
-* @param to The destination socket.
-* @param buf A pointer to the buffer to send over the network.
-* @param size The size of the buffer.
-* @retval If no error occurs, sendto returns the total number of bytes sent, which can be less than the number indicated by @b size.
-* Otherwise, non-zero (negative) error code is returned.
-*/
-int tnet_sockfd_sendto(tnet_fd_t fd, const struct sockaddr *to, const void* buf, tsk_size_t size)
-{
- tsk_size_t sent = 0;
- int ret = -1;
-
- if(fd == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Using invalid FD to send data.");
- goto bail;
- }
- if(!buf || !size){
- TSK_DEBUG_ERROR("Using invalid BUFFER.");
- ret = -2;
- goto bail;
- }
-
- while(sent < size){
-#if TNET_UNDER_WINDOWS
- WSABUF wsaBuffer;
- DWORD numberOfBytesSent = 0;
- wsaBuffer.buf = ((CHAR*)buf) + sent;
- wsaBuffer.len = (size-sent);
- ret = WSASendTo(fd, &wsaBuffer, 1, &numberOfBytesSent, 0, to, tnet_get_sockaddr_size(to), 0, 0);
-#else
- ret = sendto(fd, (((const uint8_t*)buf)+sent), (size-sent), 0, to, tnet_get_sockaddr_size(to));
-#endif
- if(ret <= 0){
- goto bail;
- }
- else{
- sent += ret;
- }
- }
-
-bail:
- return (size == sent) ? sent : ret;
-}
-
-/**@ingroup tnet_utils_group
-* Receives a datagram and stores the source address.
-* @param fd A descriptor identifying a bound socket.
-* @param buf A buffer for the incoming data.
-* @param size The length, in bytes, of the buffer pointed to by the buf parameter.
-* @param flags A set of options that modify the behavior of the function call beyond the options specified for the associated socket.
-* All flags which can be passed to @b recvfrom.
-* @param from An optional pointer to a buffer in a @b sockaddr structure that will hold the source address upon return.
-* If no error occurs, recvfrom returns the number of bytes received. If the connection has been gracefully closed, the return value is zero.
-* Otherwise, non-zero (negative) error code is returned.
-*/
-int tnet_sockfd_recvfrom(tnet_fd_t fd, void* buf, tsk_size_t size, int flags, struct sockaddr *from)
-{
- socklen_t fromlen;
-
- if(fd == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Using invalid FD to recv data.");
- return -1;
- }
-
-#if TNET_HAVE_SA_LEN
- fromlen = from->sa_len;
-#else
- fromlen = sizeof(*from);
-#endif
-
- return recvfrom(fd, buf, size, flags, from, &fromlen);
-}
-
-/**@ingroup tnet_utils_group
-* Sends data on a connected socket.
-* @param fd A descriptor identifying a connected socket.
-* @param buf A pointer to a buffer containing the data to be transmitted.
-* @param size The length, in bytes, of the data in buffer pointed to by the buf parameter.
-* @param flags A set of flags that specify the way in which the call is made.
-* All flags which can be passed to @b recv.
-* @retval If no error occurs, send returns the total number of bytes sent, which can be less than the number requested to be sent in the @b size parameter.
-*/
-tsk_size_t tnet_sockfd_send(tnet_fd_t fd, const void* buf, tsk_size_t size, int flags)
-{
- int ret = -1;
- tsk_size_t sent = 0;
-
- if(fd == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Using invalid FD to send data.");
- goto bail;
- }
-
- while(sent < size){
- if((ret = send(fd, (((const uint8_t*)buf)+sent), (size-sent), flags)) <= 0){
- if(tnet_geterrno() == TNET_ERROR_WOULDBLOCK){
- // FIXME: HORRIBLE HACK
- if((ret = tnet_sockfd_waitUntilWritable(fd, TNET_CONNECT_TIMEOUT))){
- break;
- }
- else continue;
- }
- else{
- TNET_PRINT_LAST_ERROR("send failed.");
- // Under Windows XP if WSAGetLastError()==WSAEINTR then try to disable both the ICS and the Firewall
- // More info about How to disable the ISC: http://support.microsoft.com/?scid=kb%3Ben-us%3B230112&x=6&y=11
- goto bail;
- }
- }
- else{
- sent += ret;
- }
- }
-
-bail:
- //return (size == sent) ? sent : ret;
- return sent;
-}
-
-/**@ingroup tnet_utils_group
-* Receives data from a connected socket or a bound connectionless socket.
-* @param fd The descriptor that identifies a connected socket.
-* @param buf A pointer to the buffer to receive the incoming data.
-* @param size The length, in bytes, of the buffer pointed to by the buf parameter.
-* @param flags A set of flags that influences the behavior of this function.
-* All flags which can be passed to @b recv.
-* @retval If no error occurs, recv returns the number of bytes received and the buffer pointed to by the buf parameter will contain this data received. If the connection has been gracefully closed, the return value is zero.
-* Otherwise, non-zero (negative) error code is returned.
-*/
-int tnet_sockfd_recv(tnet_fd_t fd, void* buf, tsk_size_t size, int flags)
-{
- int ret = -1;
-
- if(fd == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Using invalid FD to recv data.");
- goto bail;
- }
-
- if((ret = recv(fd, buf, size, flags)) <= 0){
- TNET_PRINT_LAST_ERROR("recv failed.");
- goto bail;
- }
-
-bail:
- return ret;
-}
-
-/**@ingroup tnet_utils_group
-* Establishes a connection to a specified socket.
-* @param fd A descriptor identifying an unconnected socket.
-* @param to A pointer to the @b sockaddr_storage structure to which the connection should be established.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_sockfd_connectto(tnet_fd_t fd, const struct sockaddr_storage *to)
-{
- int status = -1;
-
-#if TNET_UNDER_WINDOWS
-
- if((status = WSAConnect(fd, (LPSOCKADDR)to, sizeof(*to), NULL, NULL, NULL, NULL)) == SOCKET_ERROR){
- status = WSAGetLastError();
- if(status == TNET_ERROR_WOULDBLOCK || status == TNET_ERROR_ISCONN || status == TNET_ERROR_INTR || status == TNET_ERROR_INPROGRESS){
- TSK_DEBUG_WARN("TNET_ERROR_WOULDBLOCK/TNET_ERROR_ISCONN/TNET_ERROR_INTR/TNET_ERROR_INPROGRESS ==> use tnet_sockfd_waitUntilWritable.");
- status = 0;
- }
- else{
- TNET_PRINT_LAST_ERROR("WSAConnect have failed.");
- }
- }
-
-#else /* !TNET_UNDER_WINDOWS */
-
-#if TNET_HAVE_SS_LEN
- if((status = connect(fd, (struct sockaddr*)to, to->ss_len)))
-# else
- if((status = connect(fd, (struct sockaddr*)to, sizeof(*to))))
-# endif
- {
- status = tnet_geterrno();
- if(status == TNET_ERROR_WOULDBLOCK || status == TNET_ERROR_ISCONN || status == TNET_ERROR_INPROGRESS || status == TNET_ERROR_EAGAIN){
- TSK_DEBUG_WARN("TNET_ERROR_WOULDBLOCK/TNET_ERROR_ISCONN/TNET_ERROR_INPROGRESS/TNET_ERROR_EAGAIN ==> use tnet_sockfd_waitUntilWritable.");
- status = 0;
- }
- else{
- TNET_PRINT_LAST_ERROR("connect have failed.");
- }
- }
-
-#endif /* TNET_UNDER_WINDOWS */
-
- return status;
-}
-
-/**@ingroup tnet_utils_group
-*/
-int tnet_sockfd_listen(tnet_fd_t fd, int backlog)
-{
- if(fd>0){
- return listen(fd, backlog);
- }
- else return -1;
-}
-
-/**@ingroup tnet_utils_group
-*/
-tnet_fd_t tnet_sockfd_accept(tnet_fd_t fd, struct sockaddr *addr, socklen_t *addrlen)
-{
- tnet_fd_t ret = TNET_INVALID_FD;
-
- if(fd>0){
- ret = accept(fd, addr, addrlen);
- }
-
- return ret;
-}
-
-/**@ingroup tnet_utils_group
-* Closes an existing socket.
-* @param fd A descriptor identifying the socket to close.
-* @retval Zero if succeed and non-zero error code otherwise.
-*/
-int tnet_sockfd_close(tnet_fd_t *fd)
-{
- int ret;
-#if TNET_UNDER_WINDOWS
- ret = closesocket(*fd);
-#else
- ret = close(*fd);
-#endif
-
- *fd = TNET_INVALID_FD;
- return ret;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//=================================================================================================
-// INTERFACE object definition
-//
-static tsk_object_t* tnet_interface_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_interface_t *iface = self;
- if(iface){
- const char* description = va_arg(*app, const char*);
- const void* mac_address = va_arg(*app, const void*);
- tsk_size_t mac_address_length = va_arg(*app, tsk_size_t);
-
- iface->description = tsk_strdup(description);
- if((iface->mac_address = tsk_calloc(mac_address_length, sizeof(uint8_t)))){
- memcpy(iface->mac_address, mac_address, mac_address_length);
- }
- iface->mac_address_length = mac_address_length;
- }
- return self;
-}
-
-static tsk_object_t* tnet_interface_dtor(tsk_object_t * self)
-{
- tnet_interface_t *iface = self;
- if(iface){
- TSK_FREE(iface->description);
- TSK_FREE(iface->mac_address);
- }
-
- return self;
-}
-
-static int tnet_interface_cmp(const tsk_object_t *if1, const tsk_object_t *if2)
-{
- const tnet_interface_t *iface1 = if1;
- const tnet_interface_t *iface2 = if2;
-
- if(iface1 && iface2){
- return tsk_stricmp(iface1->description, iface1->description);
- }
- else if(!iface1 && !iface2) return 0;
- else return -1;
-}
-
-static const tsk_object_def_t tnet_interface_def_s =
-{
- sizeof(tnet_interface_t),
- tnet_interface_ctor,
- tnet_interface_dtor,
- tnet_interface_cmp,
-};
-const tsk_object_def_t *tnet_interface_def_t = &tnet_interface_def_s;
-
-
-
-
-//=================================================================================================
-// ADDRESS object definition
-//
-static tsk_object_t* tnet_address_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_address_t *address = self;
- if(address){
- address->ip = tsk_strdup(va_arg(*app, const char*));
- }
- return self;
-}
-
-static tsk_object_t* tnet_address_dtor(tsk_object_t * self)
-{
- tnet_address_t *address = self;
- if(address){
- TSK_FREE(address->ip);
- }
-
- return self;
-}
-
-static int tnet_address_cmp(const tsk_object_t *_a1, const tsk_object_t *_a2)
-{
- const tnet_address_t *a1 = _a1;
- const tnet_address_t *a2 = _a2;
-
- if(a1 && a2){
- // to have AF_UNSPEC, AF_UNIX, AF_INET, ... first
- return (a1->family - a2->family);
- }
- else if(!a1 && !a2) return 0;
- else return -1;
-}
-
-static const tsk_object_def_t tnet_address_def_s =
-{
- sizeof(tnet_address_t),
- tnet_address_ctor,
- tnet_address_dtor,
- tnet_address_cmp,
-};
-const tsk_object_def_t *tnet_address_def_t = &tnet_address_def_s;
-
diff --git a/branches/1.0/tinyNET/src/tnet_utils.h b/branches/1.0/tinyNET/src/tnet_utils.h
deleted file mode 100644
index f9b02ae..0000000
--- a/branches/1.0/tinyNET/src/tnet_utils.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_utils.h
- * @brief Network utility functions.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_UTILS_H
-#define TNET_UTILS_H
-
-#include "tinynet_config.h"
-
-#include "tnet_socket.h"
-#include "tnet_types.h"
-
-TNET_BEGIN_DECLS
-
-/**@ingroup tnet_utils_group
-*/
-#define TNET_CONNECT_TIMEOUT 2000
-
-/**Interface.
-*/
-typedef struct tnet_interface_s
-{
- TSK_DECLARE_OBJECT;
-
- unsigned index;
-
- char* description;
- uint8_t* mac_address;
- tsk_size_t mac_address_length;
-}
-tnet_interface_t;
-
-
-/**Address.
-*/
-typedef struct tnet_address_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_family_t family;
-
- unsigned unicast:1;
- unsigned anycast:1;
- unsigned multicast:1;
- unsigned dnsserver:1;
-
- char* ip;
-}
-tnet_address_t;
-
-TINYNET_API void tnet_getlasterror(tnet_error_t *error);
-TINYNET_API int tnet_geterrno();
-
-TINYNET_API tnet_interfaces_L_t* tnet_get_interfaces();
-TINYNET_API tnet_addresses_L_t* tnet_get_addresses(tnet_family_t family, unsigned unicast, unsigned anycast, unsigned multicast, unsigned dnsserver, long if_index);
-#define tnet_get_addresses_all() tnet_get_addresses(AF_UNSPEC, 1, 1, 1, 1, -1)
-#define tnet_get_addresses_all_unicast() tnet_get_addresses(AF_UNSPEC, 1, 0, 0, 0, -1)
-#define tnet_get_addresses_unicast4() tnet_get_addresses(AF_INET, 1, 0, 0, 0, -1)
-#define tnet_get_addresses_unicast6() tnet_get_addresses(AF_INET6, 1, 0, 0, 0, -1)
-#define tnet_get_addresses_all_anycast() tnet_get_addresses(AF_UNSPEC, 0, 1, 0, 0, -1)
-#define tnet_get_addresses_anycast4() tnet_get_addresses(AF_INET, 0, 1, 0, 0, -1)
-#define tnet_get_addresses_anycast6() tnet_get_addresses(AF_INET6, 0, 1, 0, 0, -1)
-#define tnet_get_addresses_all_multicast() tnet_get_addresses(AF_UNSPEC, 0, 0, 1, 0, -1)
-#define tnet_get_addresses_multicast4() tnet_get_addresses(AF_INET, 0, 0, 1, 0, -1)
-#define tnet_get_addresses_multicast6() tnet_get_addresses(AF_INET6, 0, 0, 1, 0, -1)
-#define tnet_get_addresses_all_dnsservers() tnet_get_addresses(AF_UNSPEC, 0, 0, 0, 1, -1)
-#define tnet_get_addresses_dnsservers4() tnet_get_addresses(AF_INET, 0, 0, 0, 1, -1)
-#define tnet_get_addresses_dnsservers6() tnet_get_addresses(AF_INET6, 0, 0, 0, 1, -1)
-
-TINYNET_API int tnet_getbestsource(const char* destination, tnet_port_t port, tnet_socket_type_t type, tnet_ip_t *source);
-TINYNET_API int tnet_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);
-TINYNET_API void tnet_freeaddrinfo(struct addrinfo *ai);
-TINYNET_API int tnet_get_sockaddr(tnet_fd_t fd, struct sockaddr_storage *result);
-TINYNET_API tnet_socket_type_t tnet_get_socket_type(tnet_fd_t fd);
-TINYNET_API tnet_family_t tnet_get_family(const char* host, tnet_port_t port);
-TINYNET_API int tnet_get_ip_n_port(tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port);
-TINYNET_API int tnet_get_sockip_n_port(struct sockaddr *addr, tnet_ip_t *ip, tnet_port_t *port);
-TINYNET_API int tnet_get_peerip_n_port(tnet_fd_t localFD, tnet_ip_t *ip, tnet_port_t *port);
-#define tnet_get_ip(fd, ip) tnet_get_ip_n_port(fd, ip, 0)
-#define tnet_get_port(fd, port) tnet_get_ip_n_port(fd, 0, port)
-#define tnet_get_sockip(addr, ip) tnet_get_sockip_n_port(addr, ip, 0)
-#define tnet_get_sockport(addr, port) tnet_get_sockip_n_port(addr, 0, port)
-#define tnet_get_peerip(localFD, ip) tnet_get_peerip_n_port(localFD, ip, 0)
-#define tnet_get_peerport(localFD, port) tnet_get_peerip_n_port(localFD, 0, port)
-
-#if TNET_HAVE_SA_LEN
-# define tnet_get_sockaddr_size(psockaddr) (psockaddr)->sa_len
-#else
-# define tnet_get_sockaddr_size(psockaddr) ((psockaddr)->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6): ((psockaddr)->sa_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(*(psockaddr))))
-#endif
-
-TINYNET_API int tnet_getnameinfo(const struct sockaddr *sa, socklen_t salen, char* node, socklen_t nodelen, char* service, socklen_t servicelen, int flags);
-TINYNET_API int tnet_gethostname(tnet_host_t* result);
-
-TINYNET_API int tnet_sockfd_waitUntil(tnet_fd_t fd, long timeout, tsk_bool_t writable);
-#define tnet_sockfd_waitUntilWritable(fd, timeout) tnet_sockfd_waitUntil(fd, timeout, tsk_true)
-#define tnet_sockfd_waitUntilReadable(fd, timeout) tnet_sockfd_waitUntil(fd, timeout, tsk_false)
-TINYNET_API int tnet_sockfd_joingroup6(tnet_fd_t fd, const char* multiaddr, unsigned iface_index);
-TINYNET_API int tnet_sockfd_leavegroup6(tnet_fd_t fd, const char* multiaddr, unsigned iface_index);
-
-TINYNET_API int tnet_sockaddrinfo_init(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *ai_addr, int *ai_family, int *ai_socktype, int *ai_protocol);
-TINYNET_API int tnet_sockaddr_init(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *addr);
-TINYNET_API int tnet_sockfd_init(const char *host, tnet_port_t port, tnet_socket_type_t type, tnet_fd_t *fd);
-
-TINYNET_API int tnet_sockfd_set_mode(tnet_fd_t fd, int nonBlocking);
-#define tnet_sockfd_set_nonblocking(fd) tnet_sockfd_set_mode(fd, 1)
-#define tnet_sockfd_set_blocking(fd) tnet_sockfd_set_mode(fd, 0)
-
-TINYNET_API tnet_tls_socket_handle_t* tnet_sockfd_set_tlsfiles(tnet_fd_t fd, int isClient, const char* tlsfile_ca, const char* tlsfile_pvk, const char* tlsfile_pbk);
-
-TINYNET_API int tnet_sockfd_sendto(tnet_fd_t fd, const struct sockaddr *to, const void* buf, tsk_size_t size);
-TINYNET_API int tnet_sockfd_recvfrom(tnet_fd_t fd, void* buf, tsk_size_t size, int flags, struct sockaddr *from);
-TINYNET_API tsk_size_t tnet_sockfd_send(tnet_fd_t fd, const void* buf, tsk_size_t size, int flags);
-TINYNET_API int tnet_sockfd_recv(tnet_fd_t fd, void* buf, tsk_size_t size, int flags);
-TINYNET_API int tnet_sockfd_connectto(tnet_fd_t fd, const struct sockaddr_storage *to);
-TINYNET_API int tnet_sockfd_listen(tnet_fd_t fd, int backlog);
-TINYNET_API tnet_fd_t tnet_sockfd_accept(tnet_fd_t fd, struct sockaddr *addr, socklen_t *addrlen);
-
-
-
-TINYNET_API int tnet_sockfd_close(tnet_fd_t *fd);
-
-/**Prints last network error to @b stderr.
-*/
-#define TNET_PRINT_LAST_ERROR(FMT, ...) \
- { \
- tnet_error_t error; \
- tnet_getlasterror(&error); \
- TSK_DEBUG_ERROR(FMT, ##__VA_ARGS__); \
- TSK_DEBUG_ERROR("(SYSTEM)NETWORK ERROR ==>%s", error) \
- }
-
-
-#if TSK_UNDER_WINDOWS
-# define tnet_ioctlt ioctlsocket /* FIXME: use WSAIoctl */
-#else
-# define tnet_ioctlt ioctl
-#endif
-
-
-tnet_interface_t* tnet_interface_create(const char* description, const void* mac_address, tsk_size_t mac_address_length);
-tnet_address_t* tnet_address_create(const char* ip);
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_interface_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_address_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_UTILS_H */
-
-
diff --git a/branches/1.0/tinyNET/src/turn/tnet_turn.c b/branches/1.0/tinyNET/src/turn/tnet_turn.c
deleted file mode 100644
index 08adb13..0000000
--- a/branches/1.0/tinyNET/src/turn/tnet_turn.c
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_turn.c
- * @brief Traversal Using Relays around NAT (TURN) implementation as per 'draft-ietf-behave-turn-16', 'draft-ietf-behave-turn-tcp-05'
- * and 'draft-ietf-behave-turn-ipv6'.
- * http://tools.ietf.org/html/draft-ietf-behave-turn-16
- * http://tools.ietf.org/html/draft-ietf-behave-turn-tcp-05
- * http://tools.ietf.org/html/draft-ietf-behave-turn-ipv6-07
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_turn.h"
-
-#include "tnet_turn_message.h"
-
-#include "tsk_string.h"
-#include "tsk_memory.h"
-
-#include "../tnet_nat.h"
-#include "../tnet_utils.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_md5.h"
-#include "tsk_debug.h"
-
-#include <string.h>
-
-/**@defgroup tnet_turn_group TURN(draft-ietf-behave-turn-16) implementation.
-*/
-
-/**@ingroup tnet_turn_group
-*/
-tnet_turn_channel_binding_t* tnet_turn_channel_binding_create(const tnet_turn_allocation_t *allocation)
-{
- return tsk_object_new(tnet_turn_channel_binding_def_t, allocation);
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_turn_permission_t* tnet_turn_permission_create(uint32_t timeout)
-{
- return tsk_object_new(tnet_turn_permission_def_t, timeout);
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_turn_allocation_t* tnet_turn_allocation_create(tnet_fd_t fd, tnet_socket_type_t socket_type, const char* server_address, tnet_port_t server_port, const char* username, const char* password)
-{
- return tsk_object_new(tnet_turn_allocation_def_t, fd, socket_type, server_address, server_port, username, password);
-}
-
-/*
-- IMPORTANT: 16. Detailed Example
-- It is suggested that the client refresh the allocation roughly 1 minute before it expires.
-- If the client wishes to immediately delete an existing allocation, it includes a LIFETIME attribute with a value of 0.
-*/
-
-typedef tnet_stun_request_t* (*tnet_turn_create_request_func)(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app);
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, tnet_stun_message_type_t type)
-{
- tnet_stun_attribute_t* attribute;
- tnet_stun_request_t *request = tnet_stun_message_create(context->username, context->password);
-
- if(request){
- request->type = type;
-
- request->fingerprint = context->enable_fingerprint;
- request->integrity = context->enable_integrity;
- request->dontfrag = context->enable_dontfrag;
- request->realm = tsk_strdup(allocation->realm);
- request->nonce = tsk_strdup(allocation->nonce);
-
- /* Create random transaction id */
- {
- tsk_istr_t random;
- tsk_md5digest_t digest;
-
- tsk_strrandom(&random);
- TSK_MD5_DIGEST_CALC(random, sizeof(random), digest);
-
- memcpy(request->transaction_id, digest, TNET_STUN_TRANSACID_SIZE);
- }
-
- /* Add software attribute */
- if(allocation->software){
- attribute = (tnet_stun_attribute_t*)tnet_stun_attribute_software_create(allocation->software, tsk_strlen(allocation->software));
- tnet_stun_message_add_attribute(request, &attribute);
- }
- }
-
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_allocate(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- tnet_stun_request_t* request = tnet_turn_create_request(context, allocation, stun_allocate_request);
- if(request){
- tnet_stun_attribute_t* attribute;
-
- /* Add Requested transport. */
- if((attribute = (tnet_stun_attribute_t*)tnet_turn_attribute_reqtrans_create(TNET_SOCKET_TYPE_IS_DGRAM(allocation->socket_type) ? TNET_PROTO_UDP: TNET_PROTO_TCP))){
- tnet_stun_message_add_attribute(request, &attribute);
- }
-
- /* Add lifetime */
- if((attribute = (tnet_stun_attribute_t*)tnet_turn_attribute_lifetime_create(tnet_ntohl(allocation->timeout)))){
- tnet_stun_message_add_attribute(request, &attribute);
- }
-
- /* Add Event Port */
- if((attribute = (tnet_stun_attribute_t*)tnet_turn_attribute_even_port_create(context->enable_evenport))){
- tnet_stun_message_add_attribute(request, &attribute);
- }
- }
-
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_refresh(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- tnet_stun_request_t *request = tnet_turn_create_request_allocate(context, allocation, app);
- if(request){
- request->type = stun_refresh_request;
- }
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_unallocate(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- tnet_stun_request_t *request = tnet_turn_create_request_refresh(context, allocation, app);
- if(request){
- ((tnet_turn_attribute_lifetime_t*)tnet_stun_message_get_attribute(request, stun_lifetime))->value = 0;
- }
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_channel_bind(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- tnet_stun_request_t* request = tnet_turn_create_request(context, allocation, stun_channelbind_request);
- if(request){
- const tnet_turn_channel_binding_t* channel_binding;
- tnet_turn_attribute_t *attribute;
- tnet_turn_channel_binding_id_t number;
- uint32_t lifetime;
-
-
- channel_binding = va_arg(*app, const tnet_turn_channel_binding_t *);
- number = tnet_htons(channel_binding->id);
- lifetime = tnet_htonl(channel_binding->timeout);
- attribute = tsk_object_ref(channel_binding->xpeer);
-
- /* XOR-PEER */
- tnet_stun_message_add_attribute(request, &attribute);
-
- /* CHANNEL-NUMBER */
- if((attribute = (tnet_stun_attribute_t*)tnet_turn_attribute_channelnum_create(number))){
- tnet_stun_message_add_attribute(request, &attribute);
- }
-
- /* LIFETIME */
- if((attribute = (tnet_stun_attribute_t*)tnet_turn_attribute_lifetime_create(lifetime))){
- tnet_stun_message_add_attribute(request, &attribute);
- }
- }
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_channel_refresh(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- return tnet_turn_create_request_channel_bind(context, allocation, app);
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_sendindication(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- tnet_stun_request_t* request = tnet_turn_create_request(context, allocation, stun_send_indication);
- if(request){
- tnet_turn_attribute_t *attribute;
- tnet_turn_attribute_xpeer_addr_t* xpeer = tsk_object_ref(va_arg(*app, tnet_turn_attribute_xpeer_addr_t *));
- const void* data = va_arg(*app, const void *);
- tsk_size_t size = va_arg(*app, tsk_size_t);
-
- /*
- draft-ietf-behave-turn-16 - 10.1. Forming a Send Indication
-
- When forming a Send indication, the client MUST include a XOR-PEER-
- ADDRESS attribute and a DATA attribute. The XOR-PEER-ADDRESS
- attribute contains the transport address of the peer to which the
- data is to be sent, and the DATA attribute contains the actual
- application data to be sent to the peer.
- */
-
- /* XOR-PEER-ADDRESS */
- tnet_stun_message_add_attribute(request, (tnet_turn_attribute_t**)&xpeer);
-
- /* DATA */
- if((attribute = (tnet_stun_attribute_t*)tnet_turn_attribute_data_create(data, size))){
- tnet_stun_message_add_attribute(request, &attribute);
- }
- }
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_request_t* tnet_turn_create_request_permission(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, va_list *app)
-{
- tnet_stun_request_t* request = tnet_turn_create_request(context, allocation, stun_createpermission_request);
- if(request){
- //--const char* ipaddress = va_arg(*app, const char *);
-
- /* XOR-PEER-ADDRESS */
- tnet_turn_attribute_xpeer_addr_t* attribute = tnet_turn_attribute_xpeer_addr_create_null();
- attribute->family = stun_ipv4;
- TNET_STUN_ATTRIBUTE(attribute)->length = 8;
-
- attribute->xaddress[0] = 0x79;
- attribute->xaddress[1] = 0xA1;
- attribute->xaddress[2] = 0x83;
- attribute->xaddress[3] = 0x47;
-
- tnet_stun_message_add_attribute(request, (tnet_stun_attribute_t**)&attribute);
-
- /*if((attribute = tnet_turn_attribute_even_port_create(context->enable_evenport)))
- {
- tnet_stun_message_add_attribute(request, &attribute);
- }*/
- }
- return request;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_send_request(const tnet_nat_context_t* context, tnet_turn_allocation_t* allocation, tnet_turn_create_request_func funcptr, ...)
-{
- tnet_stun_request_t *request;
- int ret = -1;
- va_list ap;
-
- va_start(ap, funcptr);
- request = funcptr(context, allocation, &ap);
- va_end(ap);
-
- if(request){
- if(TNET_SOCKET_TYPE_IS_DGRAM(allocation->socket_type)){
- tnet_stun_response_t *response = tnet_stun_send_unreliably(allocation->localFD, 500, 7, request, (struct sockaddr*)&allocation->server);
- if(response)
- {
- if(TNET_STUN_RESPONSE_IS_ERROR(response)){
- short code = tnet_stun_message_get_errorcode(response);
- const char* realm = tnet_stun_message_get_realm(response);
- const char* nonce = tnet_stun_message_get_nonce(response);
-
- if(code == 401 && realm && nonce){
- if(!allocation->nonce)
- { /* First time we get a nonce */
- tsk_strupdate(&allocation->nonce, nonce);
- tsk_strupdate(&allocation->realm, realm);
-
- /* Delete the message and response before retrying*/
- TSK_OBJECT_SAFE_FREE(response);
- TSK_OBJECT_SAFE_FREE(request);
-
- // Send again using new transaction identifier
- return tnet_turn_send_request(context, allocation, funcptr);
- }
- else{
- ret = -3;
- }
- }
- else
- {
- TSK_DEBUG_ERROR("Server error code: %d", code);
- ret = -2;
- }
- }
- else /* Any (allocate, permission, channel binding ...) success response */
- {
- if(response->type = stun_allocate_success_response) /* Allocate success response */
- {
- /* LifeTime */
- {
- int32_t lifetime = tnet_stun_message_get_lifetime(response);
- if(lifetime>=0)
- {
- allocation->timeout = lifetime;
- }
- }
- /* STUN mapped or xmapped address */
- {
- const tnet_stun_attribute_t *attribute;
- if((attribute = tnet_stun_message_get_attribute(response, stun_xor_mapped_address)))
- {
- allocation->xmaddr = tsk_object_ref((void*)attribute);
- }
- else if((attribute= tnet_stun_message_get_attribute(response, stun_mapped_address)))
- {
- allocation->maddr = tsk_object_ref((void*)attribute);
- }
- }
- }
-
- /* Set ret to zero (success) */
- ret = 0;
- }
- }
- else{
- ret = -4;
- }
- TSK_OBJECT_SAFE_FREE(response);
- }
- }
-
- TSK_OBJECT_SAFE_FREE(request);
- return ret;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_turn_allocation_id_t tnet_turn_allocate(const tnet_nat_context_t* nat_context, const tnet_fd_t localFD, tnet_socket_type_t socket_type)
-{
- tnet_turn_allocation_id_t id = TNET_TURN_INVALID_ALLOCATION_ID;
-
- if(nat_context){
- int ret;
- tnet_turn_allocation_t* allocation = tnet_turn_allocation_create(localFD, nat_context->socket_type, nat_context->server_address, nat_context->server_port, nat_context->username, nat_context->password);
- allocation->software = tsk_strdup(nat_context->software);
-
- if((ret = tnet_turn_send_request(nat_context, allocation, tnet_turn_create_request_allocate))){
- TSK_DEBUG_ERROR("TURN allocation failed with error code:%d.", ret);
- TSK_OBJECT_SAFE_FREE(allocation);
- }
- else{
- id = allocation->id;
- tsk_list_push_back_data(nat_context->allocations, (void**)&allocation);
- }
- }
-
- return id;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_allocation_refresh(const struct tnet_nat_context_s* nat_context, tnet_turn_allocation_t *allocation)
-{
- if(nat_context && allocation){
- int ret;
-
- if((ret = tnet_turn_send_request(nat_context, allocation, tnet_turn_create_request_refresh))){
- TSK_DEBUG_ERROR("TURN allocation refresh failed with error code:%d.", ret);
- return -1;
- }
- else{
- return 0;
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_unallocate(const tnet_nat_context_t* nat_context, tnet_turn_allocation_t *allocation)
-{
- if(nat_context && allocation){
- int ret;
-
- if((ret = tnet_turn_send_request(nat_context, allocation, tnet_turn_create_request_unallocate))){
- TSK_DEBUG_ERROR("TURN unallocation failed with error code:%d.", ret);
- return -1;
- }
- else{
- tsk_list_remove_item_by_data(nat_context->allocations, allocation);
- return 0;
- }
- }
- return -1;
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_turn_channel_binding_id_t tnet_turn_channel_bind(const tnet_nat_context_t* nat_context, tnet_turn_allocation_t *allocation, struct sockaddr_storage *peer)
-{
- tnet_turn_channel_binding_id_t id = TNET_TURN_INVALID_CHANNEL_BINDING_ID;
- tnet_turn_channel_binding_t *channel_binding = 0;
-
- if(nat_context && allocation){
- int ret;
-
- channel_binding = tnet_turn_channel_binding_create(allocation);
-
- if(channel_binding){
- if(((struct sockaddr*)peer)->sa_family == AF_INET){
- struct sockaddr_in *sin = ((struct sockaddr_in*)peer);
- uint32_t _sin_addr;
-
- channel_binding->xpeer = tnet_turn_attribute_xpeer_addr_create_null();
- channel_binding->xpeer->family = stun_ipv4;
- channel_binding->xpeer->xport = ((sin->sin_port) ^ tnet_htons(0x2112));
-
- _sin_addr = tnet_htonl_2(&sin->sin_addr) ^tnet_htonl(TNET_STUN_MAGIC_COOKIE);
- memcpy(channel_binding->xpeer->xaddress, &_sin_addr, sizeof(_sin_addr));
- }
- else if(((struct sockaddr*)peer)->sa_family == AF_INET6){
- TSK_DEBUG_ERROR("IPv6 not supported.");
- goto bail;
- }
- else{
- TSK_DEBUG_ERROR("Invalid address family.");
- goto bail;
- }
- }
- else{
- goto bail;
- }
-
- if((ret = tnet_turn_send_request(nat_context, allocation, tnet_turn_create_request_channel_bind, channel_binding))){
- TSK_DEBUG_ERROR("TURN (CHANNEL-BIND) failed with error code:%d.", ret);
- TSK_OBJECT_SAFE_FREE(channel_binding);
-
- goto bail;
- }
- else{
- id = channel_binding->id;
- tsk_list_push_back_data(allocation->channel_bindings, (void**)&channel_binding);
- }
- }
-
-bail:
- TSK_OBJECT_SAFE_FREE(channel_binding);
- return id;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_channel_refresh(const struct tnet_nat_context_s* nat_context, const tnet_turn_channel_binding_t * channel_bind)
-{
- if(nat_context && channel_bind){
- int ret;
-
- if((ret = tnet_turn_send_request(nat_context, (tnet_turn_allocation_t*)channel_bind->allocation, tnet_turn_create_request_channel_refresh, channel_bind))){
- TSK_DEBUG_ERROR("TURN channel-binding refresh failed with error code:%d.", ret);
- return -1;
- }
- else return 0;
- }
- return -1;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_channel_senddata(const struct tnet_nat_context_s* nat_context, const tnet_turn_channel_binding_t * channel_bind, const void* data, tsk_size_t size, int indication)
-{
- tnet_turn_channel_data_t *channel_data = 0;
- tsk_buffer_t *output = 0;
-
- int ret = -1;
-
- if(nat_context && channel_bind)
- {
- if(indication)
- { /* SEND INDICATION */
- if((ret = tnet_turn_send_request(nat_context, (tnet_turn_allocation_t*)channel_bind->allocation, tnet_turn_create_request_sendindication, channel_bind->xpeer, data, size)))
- {
- TSK_DEBUG_ERROR("TURN channel send indication failed with error code:%d.", ret);
- return -1;
- }
- else return 0;
- }
- else
- { /* CHANNEL DATA */
- if(!(channel_data = tnet_turn_channel_data_create(channel_bind->id, size, data)))
- {
- TSK_DEBUG_ERROR("Failed to create TURN CHANNEL-DATA message.");
- goto bail;
- }
-
- if(!(output = tnet_turn_channel_data_serialize(channel_data)))
- {
- TSK_DEBUG_ERROR("Failed to serialize TURN CHANNEL-DATA.");
- goto bail;
- }
-
- if(tnet_sockfd_sendto(channel_bind->allocation->localFD, (struct sockaddr*)&channel_bind->allocation->server, output->data, output->size) <= 0)
- {
- TNET_PRINT_LAST_ERROR("Failed to send TURN messsage.");
- ret = -2;
- goto bail;
- }
- else
- {
- ret = 0;
- }
- }
- }
-bail:
- TSK_OBJECT_SAFE_FREE(channel_data);
- TSK_OBJECT_SAFE_FREE(output);
-
- return ret;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_add_permission(const tnet_nat_context_t* nat_context, tnet_turn_allocation_t *allocation, const char* ipaddress, uint32_t timeout)
-{
- if(nat_context && allocation)
- {
- int ret;
-
- if((ret = tnet_turn_send_request(nat_context, allocation, tnet_turn_create_request_permission, ipaddress)))
- {
- TSK_DEBUG_ERROR("TURN (ADD) permission failed with error code:%d.", ret);
- return -1;
- }
- else
- {
- //tnet_turn_permission_t *permission = tnet_turn_permission_create(timeout);
- //tsk_list_remove_item_by_data(context->allocations, allocation);
- return 0;
- }
- }
- return -1;
-}
-
-//=================================================================================================
-// TURN CHANNEL-BINDING object definition
-//
-static tsk_object_t* tnet_turn_channel_binding_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_channel_binding_t *channel_binding = self;
- if(channel_binding){
- static tnet_turn_channel_binding_id_t __allocation_unique_id = 0x4000; /* 0x4000 through 0x7FFF */
-
- channel_binding->id = __allocation_unique_id++;
- channel_binding->allocation = va_arg(*app, const tnet_turn_allocation_t *);
- channel_binding->timeout = TNET_TURN_CHANBIND_TIMEOUT_DEFAULT; /* 10 minutes as per draft-ietf-behave-turn-16 subclause 11 */
-
- if(__allocation_unique_id >= 0x7FFF){
- __allocation_unique_id = 0x4000;
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_channel_binding_dtor(tsk_object_t * self)
-{
- tnet_turn_channel_binding_t *channel_binding = self;
- if(channel_binding){
- TSK_OBJECT_SAFE_FREE(channel_binding->xpeer);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_channel_binding_def_s =
-{
- sizeof(tnet_turn_channel_binding_t),
- tnet_turn_channel_binding_ctor,
- tnet_turn_channel_binding_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_channel_binding_def_t = &tnet_turn_channel_binding_def_s;
-
-//=================================================================================================
-// TURN PERMISSION object definition
-//
-static tsk_object_t* tnet_turn_permission_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_permission_t *permission = self;
- if(permission){
- permission->timeout = va_arg(*app, uint32_t);
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_permission_dtor(tsk_object_t * self)
-{
- tnet_turn_permission_t *permission = self;
- if(permission){
- TSK_OBJECT_SAFE_FREE(permission->xpeer);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_permission_def_s =
-{
- sizeof(tnet_turn_permission_t),
- tnet_turn_permission_ctor,
- tnet_turn_permission_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_permission_def_t = &tnet_turn_permission_def_s;
-
-
-
-//=================================================================================================
-// TURN ALLOCATION object definition
-//
-static tsk_object_t* tnet_turn_allocation_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_allocation_t *allocation = self;
- if(allocation){
- static tnet_turn_allocation_id_t __allocation_unique_id = 0;
-
- const char* server_address;
- tnet_port_t server_port;
-
- allocation->id = ++__allocation_unique_id;
-
- allocation->localFD = va_arg(*app, tnet_fd_t);
- allocation->socket_type = va_arg(*app, tnet_socket_type_t);
-
- server_address = va_arg(*app, const char*);
-#if defined(__GNUC__)
- server_port = (tnet_port_t)va_arg(*app, unsigned);
-#else
- server_port = va_arg(*app, tnet_port_t);
-#endif
-
- allocation->username = tsk_strdup(va_arg(*app, const char*));
- allocation->password = tsk_strdup(va_arg(*app, const char*));
-
- tnet_sockaddr_init(server_address, server_port, allocation->socket_type, &allocation->server);
- allocation->timeout = 600;
-
- allocation->channel_bindings = tsk_list_create();
- allocation->permissions = tsk_list_create();
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_allocation_dtor(tsk_object_t * self)
-{
- tnet_turn_allocation_t *allocation = self;
- if(allocation){
- TSK_FREE(allocation->relay_address);
-
- TSK_FREE(allocation->username);
- TSK_FREE(allocation->password);
- TSK_FREE(allocation->realm);
- TSK_FREE(allocation->nonce);
-
- TSK_FREE(allocation->software);
-
- TSK_OBJECT_SAFE_FREE(allocation->xmaddr);
- TSK_OBJECT_SAFE_FREE(allocation->maddr);
-
- TSK_OBJECT_SAFE_FREE(allocation->channel_bindings);
- TSK_OBJECT_SAFE_FREE(allocation->permissions);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_allocation_def_s =
-{
- sizeof(tnet_turn_allocation_t),
- tnet_turn_allocation_ctor,
- tnet_turn_allocation_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_allocation_def_t = &tnet_turn_allocation_def_s;
-
diff --git a/branches/1.0/tinyNET/src/turn/tnet_turn.h b/branches/1.0/tinyNET/src/turn/tnet_turn.h
deleted file mode 100644
index 0a43207..0000000
--- a/branches/1.0/tinyNET/src/turn/tnet_turn.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_turn.h
- * @brief Traversal Using Relays around NAT (TURN) implementation as per 'draft-ietf-behave-turn-16', 'draft-ietf-behave-turn-tcp-05'
- * and 'draft-ietf-behave-turn-ipv6'.
- * http://tools.ietf.org/html/draft-ietf-behave-turn-16
- * http://tools.ietf.org/html/draft-ietf-behave-turn-tcp-05
- * http://tools.ietf.org/html/draft-ietf-behave-turn-ipv6-07
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TURN_H
-#define TNET_TURN_H
-
-#include "tinynet_config.h"
-
-#include "turn/tnet_turn_attribute.h"
-
-#include "tnet_proto.h"
-#include "tnet_socket.h"
-#include "tnet_types.h"
-
-#include "tsk_object.h"
-
-/**@ingroup tnet_turn_group
-* @def TNET_TURN_PERMISSION_TIMEOUT_DEFAULT
-*/
-/**@ingroup tnet_turn_group
-* @def TNET_TURN_CHANBIND_TIMEOUT_DEFAULT
-*/
-TNET_BEGIN_DECLS
-
-#define TNET_TURN_PERMISSION_TIMEOUT_DEFAULT 300 /* draft-ietf-behave-turn-16 subclause 8 */
-#define TNET_TURN_CHANBIND_TIMEOUT_DEFAULT 600 /* draft-ietf-behave-turn-16 subclause 11 */
-
-
-/**@ingroup tnet_turn_group
-* @def tnet_turn_allocation_id_t.
-*/
-/**@ingroup tnet_turn_group
-* @def TNET_TURN_INVALID_ALLOCATION_ID.
-*/
-/**@ingroup tnet_turn_group
-* @def TNET_TURN_IS_VALID_ALLOCATION_ID.
-*/
-typedef uint64_t tnet_turn_allocation_id_t;
-#define TNET_TURN_INVALID_ALLOCATION_ID 0
-#define TNET_TURN_IS_VALID_ALLOCATION_ID(id) (id != TNET_TURN_INVALID_ALLOCATION_ID)
-
-/**@ingroup tnet_turn_group
-* @def tnet_turn_channel_binding_id_t.
-*/
-/**@ingroup tnet_turn_group
-* @def TNET_TURN_INVALID_CHANNEL_BINDING_ID.
-*/
-/**@ingroup tnet_turn_group
-* @def TNET_TURN_IS_VALID_CHANNEL_BINDING_ID.
-*/
-typedef uint16_t tnet_turn_channel_binding_id_t;
-#define TNET_TURN_INVALID_CHANNEL_BINDING_ID 0x00
-#define TNET_TURN_IS_VALID_CHANNEL_BINDING_ID(id) ( (0x4000 <= id) && (id <= 0x7FFF) ) /* see draft-ietf-behave-turn-16 subcaluse 11. */
-
-/**@ingroup tnet_turn_group
-*/
-typedef struct tnet_turn_permission_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_turn_attribute_xpeer_addr_t *xpeer;
- uint32_t timeout; /**< Timeout value in seconds. Default is 300s(5 minutes). */
-}
-tnet_turn_permission_t;
-typedef tsk_list_t tnet_turn_permissions_L_t; /**< List of @ref tnet_turn_permission_t elements. */
-
-/**@ingroup tnet_turn_group
-*/
-typedef struct tnet_turn_channel_binding_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_turn_channel_binding_id_t id;
- const struct tnet_turn_allocation_s *allocation;
- tnet_turn_attribute_xpeer_addr_t *xpeer;
- uint32_t timeout; /**< Timeout value in seconds. Default is 600s(10 minutes). */
-}
-tnet_turn_channel_binding_t;
-typedef tsk_list_t tnet_turn_channel_bindings_L_t; /**< List of @ref tnet_turn_channel_binding_t elements. */
-
-/**@ingroup tnet_turn_group
-*/
-typedef struct tnet_turn_allocation_s
-{
- TSK_DECLARE_OBJECT;
-
- tnet_turn_allocation_id_t id; /**< Unique id. */
-
- char* relay_address; /**< the relayed transport address */
- //! Server reflexive address of the local socket(STUN1 as per RFC 3489).
- tnet_stun_attribute_mapped_addr_t *maddr;
- //! XORed server reflexive address (STUN2 as per RFC 5389).
- tnet_stun_attribute_xmapped_addr_t *xmaddr;
-
- /* 5-tuple */
- tnet_fd_t localFD;
- tnet_socket_type_t socket_type;
-
- struct sockaddr_storage server;
-
- /*---*/
-
- /* the authentication information */
- char* username;
- char* password;
- char* realm;
- char* nonce;
- /*---*/
-
- /* the time-to-expiry */
- uint32_t timeout; /**< Timeout value in seconds. Default is 600s(10 minutes). */
- /*---*/
-
- /* A list of permissions */
- /* A list of channel to peer bindings */
-
- char* software;
-
- tnet_turn_channel_bindings_L_t *channel_bindings;
- tnet_turn_permissions_L_t *permissions;
-}
-tnet_turn_allocation_t;
-typedef tsk_list_t tnet_turn_allocations_L_t; /**< List of @ref tnet_turn_allocation_t elements. */
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_permission_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_channel_binding_def_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_allocation_def_t;
-
-//#if defined(__SYMBIAN32__) || ANDROID /* Forward declaration */
-struct tnet_nat_context_s;
-//#endif
-
-tnet_turn_allocation_id_t tnet_turn_allocate(const struct tnet_nat_context_s* nat_context, const tnet_fd_t localFD, tnet_socket_type_t socket_type);
-int tnet_turn_allocation_refresh(const struct tnet_nat_context_s* nat_context, tnet_turn_allocation_t *allocation);
-int tnet_turn_unallocate(const struct tnet_nat_context_s* nat_context, tnet_turn_allocation_t *allocation);
-tnet_turn_channel_binding_id_t tnet_turn_channel_bind(const struct tnet_nat_context_s* nat_context, tnet_turn_allocation_t *allocation, struct sockaddr_storage *peer);
-int tnet_turn_channel_refresh(const struct tnet_nat_context_s* nat_context, const tnet_turn_channel_binding_t * channel_bind);
-int tnet_turn_channel_senddata(const struct tnet_nat_context_s* nat_context, const tnet_turn_channel_binding_t * channel_bind, const void* data, tsk_size_t size, int indication);
-int tnet_turn_add_permission(const struct tnet_nat_context_s* nat_context, tnet_turn_allocation_t *allocation, const char* ipaddress, uint32_t timeout);
-
-
-TNET_END_DECLS
-
-#endif /* TNET_TURN_H */
-
diff --git a/branches/1.0/tinyNET/src/turn/tnet_turn_attribute.c b/branches/1.0/tinyNET/src/turn/tnet_turn_attribute.c
deleted file mode 100644
index 0bc55ad..0000000
--- a/branches/1.0/tinyNET/src/turn/tnet_turn_attribute.c
+++ /dev/null
@@ -1,649 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_turn_attribute.c
- * @brief New STUN Attributes as per draft-ietf-behave-turn-16 subclause 14.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_turn_attribute.h"
-
-#include "../stun/tnet_stun.h"
-
-#include "../tnet_endianness.h"
-
-#include "tsk_debug.h"
-
-#include <string.h>
-
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.1. CHANNEL-NUMBER */
-tnet_turn_attribute_channelnum_t* tnet_turn_attribute_channelnum_create(uint16_t number)
-{
- return tsk_object_new(tnet_turn_attribute_channelnum_def_t, number);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.2. LIFETIME */
-tnet_turn_attribute_lifetime_t* tnet_turn_attribute_lifetime_create(uint32_t lifetime)
-{
- return tsk_object_new(tnet_turn_attribute_lifetime_def_t, lifetime);
-}
-
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.3. XOR-PEER-ADDRESS */
-tnet_turn_attribute_xpeer_addr_t* tnet_turn_attribute_xpeer_addr_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_turn_attribute_xpeer_addr_def_t, payload, payload_size);
-}
-
-tnet_turn_attribute_xpeer_addr_t* tnet_turn_attribute_xpeer_addr_create_null()
-{
- return tnet_turn_attribute_xpeer_addr_create(tsk_null, 0);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.4. DATA */
-tnet_turn_attribute_data_t* tnet_turn_attribute_data_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_turn_attribute_data_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.5. XOR-RELAYED-ADDRESS */
-tnet_turn_attribute_xrelayed_addr_t* tnet_turn_attribute_xrelayed_addr_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_turn_attribute_xrelayed_addr_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.6. EVEN-PORT */
-tnet_turn_attribute_even_port_t* tnet_turn_attribute_even_port_create(unsigned R)
-{
- return tsk_object_new(tnet_turn_attribute_even_port_def_t, R);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.7. REQUESTED-TRANSPORT */
-tnet_turn_attribute_reqtrans_t* tnet_turn_attribute_reqtrans_create(tnet_proto_t protocol)
-{
- return tsk_object_new(tnet_turn_attribute_reqtrans_def_t, protocol);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.8. DONT-FRAGMENT */
-tnet_turn_attribute_dontfrag_t* tnet_turn_attribute_dontfrag_create()
-{
- return tsk_object_new(tnet_turn_attribute_dontfrag_def_t);
-}
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.9. RESERVATION-TOKEN */
-tnet_turn_attribute_restoken_t* tnet_turn_attribute_restoken_create(const void* payload, tsk_size_t payload_size)
-{
- return tsk_object_new(tnet_turn_attribute_restoken_def_t, payload, payload_size);
-}
-
-/**@ingroup tnet_turn_group
-*/
-tnet_stun_attribute_t* tnet_turn_attribute_deserialize(tnet_stun_attribute_type_t type, uint16_t length, const void* payload, tsk_size_t payload_size)
-{
- tnet_stun_attribute_t *attribute = tsk_null;
- const uint8_t* dataPtr = payload;
-
- /* Attribute Value
- */
-
- switch(type)
- {
- /* draft-ietf-behave-turn-16 - 14.1. CHANNEL-NUMBER */
- case stun_channel_number:
- {
- uint32_t number = tnet_htonl_2(dataPtr);
- attribute = (tnet_stun_attribute_t *)tnet_turn_attribute_channelnum_create(number);
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.2. LIFETIME */
- case stun_lifetime:
- {
- uint32_t lifetime = tnet_htonl_2(dataPtr);
- attribute = (tnet_stun_attribute_t *)tnet_turn_attribute_lifetime_create(lifetime);
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.3. XOR-PEER-ADDRESS */
- case stun_xor_peer_address:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.4. DATA */
- case stun_data:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.5. XOR-RELAYED-ADDRESS */
- case stun_xor_relayed_address:
- {
- attribute = (tnet_stun_attribute_t *)tnet_turn_attribute_xrelayed_addr_create(dataPtr, length);
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.6. EVEN-PORT */
- case stun_even_port:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.7. REQUESTED-TRANSPORT */
- case stun_requested_transport:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.8. DONT-FRAGMENT */
- case stun_dont_fragment:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
-
- /* draft-ietf-behave-turn-16 - 14.9. RESERVATION-TOKEN */
- case stun_reservation_token:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
-
- default:
- {
- TSK_DEBUG_ERROR("==> NOT IMPLEMENTED");
- break;
- }
- }
-
- if(!attribute){
- /* Create default */
- attribute = tnet_stun_attribute_create();
- }
-
- return attribute;
-}
-
-/**@ingroup tnet_turn_group
-*/
-int tnet_turn_attribute_serialize(const tnet_stun_attribute_t* attribute, tsk_buffer_t *output)
-{
- if(!attribute || !output){
- return -1;
- }
-
- /* Attribute Value
- */
-
- switch(attribute->type){
- /* draft-ietf-behave-turn-16 - 14.1. CHANNEL-NUMBER */
- case stun_channel_number:
- {
- tnet_turn_attribute_channelnum_t *number = (tnet_turn_attribute_channelnum_t*)attribute;
- tsk_buffer_append(output, &(number->number), 2);
- return 0;
- }
-
- /* draft-ietf-behave-turn-16 - 14.2. LIFETIME */
- case stun_lifetime:
- {
- tnet_turn_attribute_lifetime_t *lifetime = (tnet_turn_attribute_lifetime_t*)attribute;
- tsk_buffer_append(output, &(lifetime->value), 4);
- return 0;
- }
-
- /* draft-ietf-behave-turn-16 - 14.3. XOR-PEER-ADDRESS */
- case stun_xor_peer_address:
- {
- tnet_turn_attribute_xpeer_addr_t* xpeer = (tnet_turn_attribute_xpeer_addr_t*)attribute;
- if(xpeer){
- if(xpeer->family == stun_ipv4){
- uint8_t pad = 0x00;
- tsk_buffer_append(output, &pad, 1);
- tsk_buffer_append(output, &xpeer->family, 1);
- tsk_buffer_append(output, &xpeer->xport, 2);
- tsk_buffer_append(output, xpeer->xaddress, 4);
- }
- else
- {
- TSK_DEBUG_ERROR("SERIALIZE:XOR-PEER-ADDRESS ==> IPV6 - NOT IMPLEMENTED");
- return -3;
- }
- }
- return 0;
- }
-
- /* draft-ietf-behave-turn-16 - 14.4. DATA */
- case stun_data:
- {
- tnet_turn_attribute_data_t *data = (tnet_turn_attribute_data_t*)attribute;
- if(data->value){
- tsk_buffer_append(output, data->value->data, data->value->size);
- }
- return 0;
- }
-
- /* draft-ietf-behave-turn-16 - 14.5. XOR-RELAYED-ADDRESS */
- case stun_xor_relayed_address:
- {
- TSK_DEBUG_ERROR("SERIALIZE:XOR-RELAYED-ADDRESS ==> NOT IMPLEMENTED");
- return -3;
- }
-
- /* draft-ietf-behave-turn-16 - 14.6. EVEN-PORT */
- case stun_even_port:
- {
- tnet_turn_attribute_even_port_t *even_port = (tnet_turn_attribute_even_port_t*)attribute;
- uint8_t value = (even_port->R << 7);
- tsk_buffer_append(output, &(value), 1);
- return 0;
- }
-
- /* draft-ietf-behave-turn-16 - 14.7. REQUESTED-TRANSPORT */
- case stun_requested_transport:
- {
- tnet_turn_attribute_reqtrans_t *reqtrans = (tnet_turn_attribute_reqtrans_t*)attribute;
- tsk_buffer_append(output, &(reqtrans->protocol), 1);
- tsk_buffer_append(output, &(reqtrans->rffu), 3);
- return 0;
- }
-
- /* draft-ietf-behave-turn-16 - 14.8. DONT-FRAGMENT */
- case stun_dont_fragment:
- {
- TSK_DEBUG_ERROR("SERIALIZE:DONT-FRAGMENT ==> NOT IMPLEMENTED");
- return -3;
- }
-
- /* draft-ietf-behave-turn-16 - 14.9. RESERVATION-TOKEN */
- case stun_reservation_token:
- {
- TSK_DEBUG_ERROR("SERIALIZE:TOKEN ==> NOT IMPLEMENTED");
- return -3;
- }
- }
-
- return 0;
-}
-
-
-
-
-
-
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.1. CHANNEL-NUMBER]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_channelnum_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_channelnum_t *attribute = self;
- if(attribute){
-#if defined (__GNUC__)
- attribute->number = (uint16_t)(va_arg(*app, unsigned));
-#else
- attribute->number = (va_arg(*app, uint16_t));
-#endif
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_channel_number;
- TNET_STUN_ATTRIBUTE(attribute)->length = 2;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_channelnum_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_channelnum_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_channelnum_def_s =
-{
- sizeof(tnet_turn_attribute_channelnum_t),
- tnet_turn_attribute_channelnum_ctor,
- tnet_turn_attribute_channelnum_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_channelnum_def_t = &tnet_turn_attribute_channelnum_def_s;
-
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.2. LIFETIME]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_lifetime_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_lifetime_t *attribute = self;
- if(attribute){
- attribute->value = /*tnet_htonl*/(va_arg(*app, uint32_t));
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_lifetime;
- TNET_STUN_ATTRIBUTE(attribute)->length = 4;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_lifetime_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_lifetime_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_lifetime_def_s =
-{
- sizeof(tnet_turn_attribute_lifetime_t),
- tnet_turn_attribute_lifetime_ctor,
- tnet_turn_attribute_lifetime_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_lifetime_def_t = &tnet_turn_attribute_lifetime_def_s;
-
-
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.3. XOR-PEER-ADDRESS]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_xpeer_addr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_xpeer_addr_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- }
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_xor_peer_address;
- TNET_STUN_ATTRIBUTE(attribute)->length = 8;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_xpeer_addr_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_xpeer_addr_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_xpeer_addr_def_s =
-{
- sizeof(tnet_turn_attribute_xpeer_addr_t),
- tnet_turn_attribute_xpeer_addr_ctor,
- tnet_turn_attribute_xpeer_addr_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_xpeer_addr_def_t = &tnet_turn_attribute_xpeer_addr_def_s;
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.4. DATA]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_data_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_data_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- attribute->value = tsk_buffer_create(payload, payload_size);
- }
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_data;
- TNET_STUN_ATTRIBUTE(attribute)->length = (uint16_t)payload_size;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_data_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_data_t *attribute = self;
- if(attribute){
- TSK_OBJECT_SAFE_FREE(attribute->value);
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_data_def_s =
-{
- sizeof(tnet_turn_attribute_data_t),
- tnet_turn_attribute_data_ctor,
- tnet_turn_attribute_data_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_data_def_t = &tnet_turn_attribute_data_def_s;
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.5. XOR-RELAYED-ADDRESS]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_xrelayed_addr_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_xrelayed_addr_t *attribute = self;
- if(attribute){
- const void *payload = va_arg(*app, const void*);
- tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- if(payload && payload_size){
- const uint8_t *payloadPtr = (const uint8_t*)payload;
- payloadPtr += 1; /* Ignore first 8bits */
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_xor_relayed_address;
- TNET_STUN_ATTRIBUTE(attribute)->length = payload_size;
-
- attribute->family = (tnet_stun_addr_family_t)(*(payloadPtr++));
-
- attribute->xport = tnet_ntohs_2(payloadPtr);
- attribute->xport ^= 0x2112;
- payloadPtr+=2;
-
- { /*=== Compute IP address */
- tsk_size_t addr_size = (attribute->family == stun_ipv6) ? 16 : (attribute->family == stun_ipv4 ? 4 : 0);
- if(addr_size){
- tsk_size_t i;
- uint32_t addr;
-
- for(i=0; i<addr_size; i+=4){
- addr = tnet_htonl_2(payloadPtr);
- addr ^= TNET_STUN_MAGIC_COOKIE;
- memcpy(&attribute->xaddress[i], &addr, 4);
- payloadPtr+=4;
- }
- }
- else{
- TSK_DEBUG_ERROR("UNKNOWN FAMILY [%u].", attribute->family);
- }
- }
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_xrelayed_addr_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_xrelayed_addr_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_xrelayed_addr_def_s =
-{
- sizeof(tnet_turn_attribute_xrelayed_addr_t),
- tnet_turn_attribute_xrelayed_addr_ctor,
- tnet_turn_attribute_xrelayed_addr_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_xrelayed_addr_def_t = &tnet_turn_attribute_xrelayed_addr_def_s;
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.6. EVEN-PORT]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_even_port_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_even_port_t *attribute = self;
- if(attribute){
- attribute->R = va_arg(*app, unsigned);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_even_port;
- TNET_STUN_ATTRIBUTE(attribute)->length = 1;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_even_port_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_even_port_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_even_port_def_s =
-{
- sizeof(tnet_turn_attribute_even_port_t),
- tnet_turn_attribute_even_port_ctor,
- tnet_turn_attribute_even_port_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_even_port_def_t = &tnet_turn_attribute_even_port_def_s;
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.7. REQUESTED-TRANSPORT]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_reqtrans_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_reqtrans_t *attribute = self;
- if(attribute){
- attribute->protocol = va_arg(*app, tnet_proto_t);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_requested_transport;
- TNET_STUN_ATTRIBUTE(attribute)->length = 4;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_reqtrans_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_reqtrans_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_reqtrans_def_s =
-{
- sizeof(tnet_turn_attribute_reqtrans_t),
- tnet_turn_attribute_reqtrans_ctor,
- tnet_turn_attribute_reqtrans_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_reqtrans_def_t = &tnet_turn_attribute_reqtrans_def_s;
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.8. DONT-FRAGMENT]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_dontfrag_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_dontfrag_t *attribute = self;
- if(attribute){
- //const void *payload = va_arg(*app, const void*);
- //tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_dont_fragment;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_dontfrag_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_dontfrag_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_dontfrag_def_s =
-{
- sizeof(tnet_turn_attribute_dontfrag_t),
- tnet_turn_attribute_dontfrag_ctor,
- tnet_turn_attribute_dontfrag_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_dontfrag_def_t = &tnet_turn_attribute_dontfrag_def_s;
-
-
-
-//=================================================================================================
-// [[draft-ietf-behave-turn-16 - 14.9. RESERVATION-TOKEN]] object definition
-//
-static tsk_object_t* tnet_turn_attribute_restoken_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_attribute_restoken_t *attribute = self;
- if(attribute){
- //--const void *payload = va_arg(*app, const void*);
- //--tsk_size_t payload_size = va_arg(*app, tsk_size_t);
-
- TNET_STUN_ATTRIBUTE(attribute)->type = stun_reservation_token;
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_attribute_restoken_dtor(tsk_object_t * self)
-{
- tnet_turn_attribute_restoken_t *attribute = self;
- if(attribute){
- }
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_attribute_restoken_def_s =
-{
- sizeof(tnet_turn_attribute_restoken_t),
- tnet_turn_attribute_restoken_ctor,
- tnet_turn_attribute_restoken_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_attribute_restoken_def_t = &tnet_turn_attribute_restoken_def_s;
diff --git a/branches/1.0/tinyNET/src/turn/tnet_turn_attribute.h b/branches/1.0/tinyNET/src/turn/tnet_turn_attribute.h
deleted file mode 100644
index 8a1915e..0000000
--- a/branches/1.0/tinyNET/src/turn/tnet_turn_attribute.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_turn_attribute.h
- * @brief New STUN Attributes as per draft-ietf-behave-turn-16 subclause 14.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TURN_ATTRIBUTE_H
-#define TNET_TURN_ATTRIBUTE_H
-
-#include "tinynet_config.h"
-#include "tnet_proto.h"
-#include "stun/tnet_stun_attribute.h"
-
-TNET_BEGIN_DECLS
-
-typedef tnet_stun_attribute_t tnet_turn_attribute_t;
-
-/* draft-ietf-behave-turn-16 - 14.1. CHANNEL-NUMBER
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Channel Number | RFFU = 0 |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
-/**@ingroup tnet_turn_group
-*/
-typedef struct tnet_turn_attribute_channelnum_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- uint16_t number;
- uint16_t rffu;
-}
-tnet_turn_attribute_channelnum_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_channelnum_def_t;
-
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.2. LIFETIME
-*/
-typedef struct tnet_turn_attribute_lifetime_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- uint32_t value;
-}
-tnet_turn_attribute_lifetime_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_lifetime_def_t;
-
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.3. XOR-PEER-ADDRESS
-*/
-typedef struct tnet_turn_attribute_xpeer_addr_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- tnet_stun_addr_family_t family;
- uint16_t xport;
- uint8_t xaddress[16];
-}
-tnet_turn_attribute_xpeer_addr_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_xpeer_addr_def_t;
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.4. DATA
-*/
-typedef struct tnet_turn_attribute_data_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- tsk_buffer_t* value;
-}
-tnet_turn_attribute_data_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_data_def_t;
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.5. XOR-RELAYED-ADDRESS
-*/
-typedef struct tnet_turn_attribute_xrelayed_addr_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- tnet_stun_addr_family_t family;
- uint16_t xport;
- uint8_t xaddress[16];
-}
-tnet_turn_attribute_xrelayed_addr_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_xrelayed_addr_def_t;
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.6. EVEN-PORT
-*/
-typedef struct tnet_turn_attribute_even_port_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
-/*
- 0 1 2 3 4 5 6 7
- +-+-+-+-+-+-+-+-+
- |R| RFFU |
- +-+-+-+-+-+-+-+-+
-*/
- unsigned R:1;
- unsigned rffu:7;
-}
-tnet_turn_attribute_even_port_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_even_port_def_t;
-
-
-/**@ingroup tnet_turn_group
-*/
-typedef struct tnet_turn_attribute_reqtrans_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-/*
- draft-ietf-behave-turn-16 - 14.7. REQUESTED-TRANSPORT
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Protocol | RFFU |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-*/
- tnet_proto_t protocol;
- uint8_t rffu[3];
-}
-tnet_turn_attribute_reqtrans_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_reqtrans_def_t;
-
-
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.8. DONT-FRAGMENT
-*/
-typedef struct tnet_turn_attribute_dontfrag_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-}
-tnet_turn_attribute_dontfrag_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_dontfrag_def_t;
-
-
-/**@ingroup tnet_turn_group
-* draft-ietf-behave-turn-16 - 14.9. RESERVATION-TOKEN
-*/
-typedef struct tnet_turn_attribute_restoken_s
-{
- TNET_STUN_DECLARE_ATTRIBUTE;
-
- uint8_t value[8];
-}
-tnet_turn_attribute_restoken_t;
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_attribute_restoken_def_t;
-
-
-tnet_stun_attribute_t* tnet_turn_attribute_deserialize(tnet_stun_attribute_type_t type, uint16_t length, const void* payload, tsk_size_t payload_size);
-int tnet_turn_attribute_serialize(const tnet_stun_attribute_t* attribute, tsk_buffer_t *output);
-
-tnet_turn_attribute_channelnum_t* tnet_turn_attribute_channelnum_create(uint16_t number);
-tnet_turn_attribute_lifetime_t* tnet_turn_attribute_lifetime_create(uint32_t lifetime);
-tnet_turn_attribute_xpeer_addr_t* tnet_turn_attribute_xpeer_addr_create(const void* payload, tsk_size_t payload_size);
-tnet_turn_attribute_xpeer_addr_t* tnet_turn_attribute_xpeer_addr_create_null();
-tnet_turn_attribute_data_t* tnet_turn_attribute_data_create(const void* payload, tsk_size_t payload_size);
-tnet_turn_attribute_xrelayed_addr_t* tnet_turn_attribute_xrelayed_addr_create(const void* payload, tsk_size_t payload_size);
-tnet_turn_attribute_even_port_t* tnet_turn_attribute_even_port_create(unsigned R);
-tnet_turn_attribute_reqtrans_t* tnet_turn_attribute_reqtrans_create(tnet_proto_t protocol);
-tnet_turn_attribute_dontfrag_t* tnet_turn_attribute_dontfrag_create();
-tnet_turn_attribute_restoken_t* tnet_turn_attribute_restoken_create(const void* payload, tsk_size_t payload_size);
-
-TNET_END_DECLS
-
-#endif /* TNET_TURN_ATTRIBUTE_H */
-
diff --git a/branches/1.0/tinyNET/src/turn/tnet_turn_message.c b/branches/1.0/tinyNET/src/turn/tnet_turn_message.c
deleted file mode 100644
index 90372c3..0000000
--- a/branches/1.0/tinyNET/src/turn/tnet_turn_message.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_turn_message.c
- * @brief Traversal Using Relays around NAT (TURN) messages.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#include "tnet_turn_message.h"
-
-#include "../tnet_types.h"
-#include "../tnet_endianness.h"
-
-#include "tsk_memory.h"
-
-#include <string.h>
-
-tnet_turn_channel_data_t* tnet_turn_channel_data_create(uint16_t number, uint16_t length, const void* data)
-{
- return tsk_object_new(tnet_turn_channel_data_def_t, number, length, data);
-}
-
-tnet_turn_channel_data_t* tnet_turn_channel_data_create_null()
-{
- return tnet_turn_channel_data_create(0, 0, tsk_null);
-}
-
-/**@ingroup tnet_turn_group
-*/
-tsk_buffer_t* tnet_turn_channel_data_serialize(const tnet_turn_channel_data_t *message)
-{
- tsk_buffer_t *output = 0;
-
- if(!message) goto bail;
-
- output = tsk_buffer_create_null();
-
- /* draft-ietf-behave-turn-16 11.4. The ChannelData Message
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Channel Number | Length |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- / Application Data /
- / /
- | |
- | +-------------------------------+
- | |
- +-------------------------------+
- */
-
- /* Channel Number
- */
- {
- uint16_t number = tnet_htons(message->chanel_number);
- tsk_buffer_append(output, &(number), 2);
- }
-
- /* Length
- */
- {
- uint16_t length = tnet_htons(message->length);
- tsk_buffer_append(output, &(length), 2);
- }
-
- /* Application Data
- */
- {
- tsk_buffer_append(output, message->data, message->length);
-
- /* === Padding:
- Over stream transports, the ChannelData message MUST be padded to a
- multiple of four bytes in order to ensure the alignment of subsequent
- messages. The padding is not reflected in the length field of the
- ChannelData message, so the actual size of a ChannelData message
- (including padding) is (4 + Length) rounded up to the nearest
- multiple of 4. Over UDP, the padding is not required but MAY be included.
- */
- if(message->length%4)
- {
- static uint32_t zeros = 0x00000000;
- tsk_buffer_append(output, &zeros, 4-(message->length%4));
- }
- }
-
-bail:
- return output;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//=================================================================================================
-// TURN CHANNEL-DATA message object definition
-//
-static tsk_object_t* tnet_turn_channel_data_ctor(tsk_object_t * self, va_list * app)
-{
- tnet_turn_channel_data_t *message = self;
- if(message){
- const void* data;
-
-#if defined(__GNUC__)
- message->chanel_number = (uint16_t)va_arg(*app, unsigned);
- message->length = (uint16_t)va_arg(*app, unsigned);
-#else
- message->chanel_number = va_arg(*app, uint16_t);
- message->length = va_arg(*app, uint16_t);
-#endif
- data = va_arg(*app, const void*);
-
- if(data && message->length){
- if((message->data = tsk_calloc(message->length, sizeof(uint8_t)))){
- memcpy(message->data, data, message->length);
- }
- }
- }
- return self;
-}
-
-static tsk_object_t* tnet_turn_channel_data_dtor(tsk_object_t * self)
-{
- tnet_turn_channel_data_t *message = self;
- if(message){
- TSK_FREE(message->data);
- }
-
- return self;
-}
-
-static const tsk_object_def_t tnet_turn_channel_data_def_s =
-{
- sizeof(tnet_turn_channel_data_t),
- tnet_turn_channel_data_ctor,
- tnet_turn_channel_data_dtor,
- tsk_null,
-};
-const tsk_object_def_t *tnet_turn_channel_data_def_t = &tnet_turn_channel_data_def_s;
diff --git a/branches/1.0/tinyNET/src/turn/tnet_turn_message.h b/branches/1.0/tinyNET/src/turn/tnet_turn_message.h
deleted file mode 100644
index 1bd1714..0000000
--- a/branches/1.0/tinyNET/src/turn/tnet_turn_message.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-* Copyright (C) 2009-2010 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 DOUBANGO.
-*
-*/
-
-/**@file tnet_turn_message.h
- * @brief Traversal Using Relays around NAT (TURN) messages.
- *
- * @author Mamadou Diop <diopmamadou(at)doubango.org>
- *
- * @date Created: Sat Nov 8 16:54:58 2009 mdiop
- */
-#ifndef TNET_TURN_MESSAGE_H
-#define TNET_TURN_MESSAGE_H
-
-#include "../tinynet_config.h"
-
-#include "tsk_buffer.h"
-
-TNET_BEGIN_DECLS
-
-/**@ingroup tnet_turn_group
- * TURN channel data message as per draft-ietf-behave-turn-16 subclause 11.4.
-*/
-typedef struct tnet_turn_channel_data_s
-{
- TSK_DECLARE_OBJECT;
-
- /* draft-ietf-behave-turn-16 11.4. The ChannelData Message
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Channel Number | Length |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- / Application Data /
- / /
- | |
- | +-------------------------------+
- | |
- +-------------------------------+
- */
- uint16_t chanel_number;
- uint16_t length;
- void* data;
-}
-tnet_turn_channel_data_t;
-
-tsk_buffer_t* tnet_turn_channel_data_serialize(const tnet_turn_channel_data_t *message);
-
-tnet_turn_channel_data_t* tnet_turn_channel_data_create(uint16_t number, uint16_t length, const void* data);
-tnet_turn_channel_data_t* tnet_turn_channel_data_create_null();
-
-TINYNET_GEXTERN const tsk_object_def_t *tnet_turn_channel_data_def_t;
-
-TNET_END_DECLS
-
-#endif /* TNET_TURN_MESSAGE_H */
diff --git a/branches/1.0/tinyNET/test/droid-makefile b/branches/1.0/tinyNET/test/droid-makefile
deleted file mode 100644
index 26651a2..0000000
--- a/branches/1.0/tinyNET/test/droid-makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-APP := test
-
-CFLAGS := $(CFLAGS_COMMON) -I../src -I../../tinySAK/src
-LDFLAGS := $(LDFLAGS_COMMON) -Wl,-Bsymbolic,--whole-archive -l$(PROJECT) -ltinySAK -Wl,--entry=main
-
-all: $(APP)
-
-OBJS += $(APP).o
-
-$(APP): $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $^
-
-%.o: %.c
- $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
-
-install: $(APP)
- $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(EXEC_DIR)/$(APP)
- $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(EXEC_DIR)/$(APP)
-
-run:
- $(ANDROID_SDK_ROOT)/tools/adb shell $(EXEC_DIR)/$(APP)
-
-#dbg:
-# $(MAKE) $(MAKEFILE) DEBUG="-g -DDEBUG"
-# $(MAKE) $(MAKEFILE) install
-
-clean:
- @rm -f $(OBJS) $(APP) \ No newline at end of file
diff --git a/branches/1.0/tinyNET/test/stdafx.c b/branches/1.0/tinyNET/test/stdafx.c
deleted file mode 100644
index df71e1b..0000000
--- a/branches/1.0/tinyNET/test/stdafx.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/branches/1.0/tinyNET/test/stdafx.h b/branches/1.0/tinyNET/test/stdafx.h
deleted file mode 100644
index b1200be..0000000
--- a/branches/1.0/tinyNET/test/stdafx.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-
-#ifndef TEST_TNET_STDAFX_H
-#define TEST_TNET_STDAFX_H
-
-#ifdef WIN32
-#include "targetver.h"
-#endif
-
-#include <stdio.h>
-#include <string.h>
-//#include <tchar.h>
-
-
-
-// TODO: reference additional headers your program requires here
-
-#endif /* TEST_TNET_STDAFX_H */
diff --git a/branches/1.0/tinyNET/test/targetver.h b/branches/1.0/tinyNET/test/targetver.h
deleted file mode 100644
index 08a10a4..0000000
--- a/branches/1.0/tinyNET/test/targetver.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef TNET_TEST_TARGETVER_H
-#define TNET_TEST_TARGETVER_H
-
-// The following macros define the minimum required platform. The minimum required platform
-// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
-// your application. The macros work by enabling all features available on platform versions up to and
-// including the version specified.
-
-// Modify the following defines if you have to target a platform prior to the ones specified below.
-// Refer to MSDN for the latest info on corresponding values for different platforms.
-#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
-#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#endif /* TNET_TEST_TARGETVER_H */ \ No newline at end of file
diff --git a/branches/1.0/tinyNET/test/test.c b/branches/1.0/tinyNET/test/test.c
deleted file mode 100644
index f27e05c..0000000
--- a/branches/1.0/tinyNET/test/test.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#include "stdafx.h"
-
-#include "tsk.h"
-
-#include "tinynet.h"
-
-#include "test_sockets.h"
-#include "test_transport.h"
-#include "test_auth.h"
-#include "test_stun.h"
-#include "test_nat.h"
-#include "test_ifaces.h"
-#include "test_dns.h"
-#include "test_dhcp.h"
-#include "test_dhcp6.h"
-#include "test_tls.h"
-
-#define RUN_TEST_LOOP 1
-
-#define RUN_TEST_ALL 0
-#define RUN_TEST_SOCKETS 0 /* FIXME: Android */
-#define RUN_TEST_TRANSPORT 0
-#define RUN_TEST_AUTH 0
-#define RUN_TEST_STUN 0
-#define RUN_TEST_NAT 1
-#define RUN_TEST_IFACES 0
-#define RUN_TEST_DNS 0
-#define RUN_TEST_DHCP 0
-#define RUN_TEST_DHCP6 0
-#define RUN_TEST_TLS 0
-
-#ifdef _WIN32_WCE
-int _tmain(int argc, _TCHAR* argv[])
-#else
-int main()
-#endif
-{
- /* Startup the network stack. */
- if(tnet_startup()){
- return -1;
- }
-
-#if RUN_TEST_LOOP
- for(;;)
-#endif
- {
-
-#if RUN_TEST_ALL || RUN_TEST_SOCKETS
- test_sockets();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_TRANSPORT
- test_transport();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_AUTH
- test_auth();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_STUN
- test_stun();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_NAT
- test_nat();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_IFACES
- test_ifaces();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_DNS
- test_dns();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_DHCP
- test_dhcp();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_DHCP6
- test_dhcp6();
-#endif
-
-#if RUN_TEST_ALL || RUN_TEST_TLS
- test_tls();
-#endif
-
- }
-
- /* Cleanup the network stack */
- tnet_cleanup();
-
- return 0;
-}
-
diff --git a/branches/1.0/tinyNET/test/test.vcproj b/branches/1.0/tinyNET/test/test.vcproj
deleted file mode 100644
index fcf6413..0000000
--- a/branches/1.0/tinyNET/test/test.vcproj
+++ /dev/null
@@ -1,414 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="test"
- ProjectGUID="{2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}"
- RootNamespace="test"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(SolutionDir)\src&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
- PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- WarnAsError="true"
- DebugInformationFormat="4"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib ws2_32.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
- IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="1"
- />
- <Tool
- Name="VCCLCompilerTool"
- ExecutionBucket="7"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(SolutionDir)\src&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
- PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;_CONSOLE;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_)"
- MinimalRebuild="true"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="8"
- EntryPointSymbol="mainWCRTStartup"
- TargetMachine="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCCodeSignTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- OutputDirectory="$(SolutionDir)Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
- IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="1"
- />
- <Tool
- Name="VCCLCompilerTool"
- ExecutionBucket="7"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCCodeSignTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\stdafx.c"
- >
- </File>
- <File
- RelativePath=".\test.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
- <File
- RelativePath=".\targetver.h"
- >
- </File>
- </Filter>
- <Filter
- Name="tests"
- >
- <File
- RelativePath=".\test_auth.h"
- >
- </File>
- <File
- RelativePath=".\test_dhcp.h"
- >
- </File>
- <File
- RelativePath=".\test_dhcp6.h"
- >
- </File>
- <File
- RelativePath=".\test_dns.h"
- >
- </File>
- <File
- RelativePath=".\test_ifaces.h"
- >
- </File>
- <File
- RelativePath=".\test_nat.h"
- >
- </File>
- <File
- RelativePath=".\test_sockets.h"
- >
- </File>
- <File
- RelativePath=".\test_stun.h"
- >
- </File>
- <File
- RelativePath=".\test_tls.h"
- >
- </File>
- <File
- RelativePath=".\test_transport.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/branches/1.0/tinyNET/test/test_auth.h b/branches/1.0/tinyNET/test/test_auth.h
deleted file mode 100644
index 20e96af..0000000
--- a/branches/1.0/tinyNET/test/test_auth.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_AUTH_H
-#define TNET_TEST_AUTH_H
-
-void test_auth()
-{
-
-}
-
-#endif /* TNET_TEST_AUTH_H */
-
diff --git a/branches/1.0/tinyNET/test/test_dhcp.h b/branches/1.0/tinyNET/test/test_dhcp.h
deleted file mode 100644
index 6b976aa..0000000
--- a/branches/1.0/tinyNET/test/test_dhcp.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_DHCP_H
-#define TNET_TEST_DHCP_H
-
-
-
-void test_dhcp_discover(tnet_dhcp_ctx_t *ctx)
-{
-}
-
-void test_dhcp_offer(tnet_dhcp_ctx_t *ctx)
-{
-}
-
-void test_dhcp_request(tnet_dhcp_ctx_t *ctx)
-{
-}
-
-void test_dhcp_inform(tnet_dhcp_ctx_t *ctx)
-{
- tnet_dhcp_params_t *params = tsk_null;
- tnet_dhcp_reply_t *reply = tsk_null;
-
- params = tnet_dhcp_params_create();
- tnet_dhcp_params_add_code(params, dhcp_code_SIP_Servers_DHCP_Option); /* SIP Servers */
- tnet_dhcp_params_add_code(params, dhcp_code_Domain_Server); /* DNS Server */
-
- reply = tnet_dhcp_query_inform(ctx, params);
-
- if(reply && !TNET_DHCP_MESSAGE_IS_REPLY(reply)){
- TSK_DEBUG_ERROR("DHCP request is not expected in response to a request.");
- goto bail;
- }
-
- if(reply){
- switch(reply->type)
- {
- case dhcp_type_ack:
- {
- tsk_list_item_t *item;
- TSK_DEBUG_INFO("DHCP response type ==> ACK.");
-
- tsk_list_foreach(item, reply->options)
- {
- const tnet_dhcp_option_t *option = item->data;
-
- /* SIP SERVERS */
- if(option->code == dhcp_code_SIP_Servers_DHCP_Option)
- {
- tsk_list_item_t *item2;
- const tnet_dhcp_option_sip_t *option_sip4 = (const tnet_dhcp_option_sip_t*)option;;
- tsk_list_foreach(item2, option_sip4->servers)
- {
- const tsk_string_t *str = item2->data;
- TSK_DEBUG_INFO("DHCP-SIP_SERVER ==>%s", str->value);
- }
- }
-
- /* DNS SERVERS */
- if(option->code == dhcp_code_Domain_Server)
- {
- tsk_list_item_t *item2;
- const tnet_dhcp_option_dns_t *option_dns = (const tnet_dhcp_option_dns_t*)option;;
- tsk_list_foreach(item2, option_dns->servers)
- {
- const tsk_string_t *str = item2->data;
- TSK_DEBUG_INFO("DHCP-DNS_SERVER ==>%s", str->value);
- }
- }
- }
- break;
- }
-
- default:
- {
- break;
- }
- }
- }
- else
- {
- TSK_DEBUG_ERROR("DHCP reply is NULL.");
- goto bail;
- }
-
-bail:
- TSK_OBJECT_SAFE_FREE(reply);
- TSK_OBJECT_SAFE_FREE(params);
-
- //tsk_thread_sleep(1000);
-}
-
-void test_dhcp()
-{
- tnet_dhcp_ctx_t *ctx = tnet_dhcp_ctx_create();
- test_dhcp_inform(ctx);
-
- TSK_OBJECT_SAFE_FREE(ctx);
-}
-
-#endif /* TNET_TEST_DHCP_H */
diff --git a/branches/1.0/tinyNET/test/test_dhcp6.h b/branches/1.0/tinyNET/test/test_dhcp6.h
deleted file mode 100644
index a132cca..0000000
--- a/branches/1.0/tinyNET/test/test_dhcp6.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_DHCP6_H
-#define TNET_TEST_DHCP6_H
-
-
-
-void test_dhcp6_requestinfo(tnet_dhcp6_ctx_t *ctx)
-{
- tnet_dhcp6_option_orequest_t *orequest = tnet_dhcp6_option_orequest_create_null();
- tnet_dhcp6_reply_t* reply = 0;
-
- tnet_dhcp6_option_orequest_add_code(orequest, 24);
- tnet_dhcp6_option_orequest_add_code(orequest, 23);
- tnet_dhcp6_option_orequest_add_code(orequest, 21); /* SIP Servers Domain Name List */
- tnet_dhcp6_option_orequest_add_code(orequest, 22); /* SIP Servers IPv6 Address List */
-
- reply = tnet_dhcp6_requestinfo(ctx, orequest);
-
- TSK_OBJECT_SAFE_FREE(orequest);
- TSK_OBJECT_SAFE_FREE(reply);
-}
-
-void test_dhcp6()
-{
- tnet_dhcp6_ctx_t *ctx = tnet_dhcp6_ctx_create();
- test_dhcp6_requestinfo(ctx);
-
- TSK_OBJECT_SAFE_FREE(ctx);
-}
-
-#endif /* TNET_TEST_DHCP6_H */
diff --git a/branches/1.0/tinyNET/test/test_dns.h b/branches/1.0/tinyNET/test/test_dns.h
deleted file mode 100644
index b7990b5..0000000
--- a/branches/1.0/tinyNET/test/test_dns.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_DNS_H
-#define TNET_TEST_DNS_H
-
-//#include "tnet_utils.h" /* tnet_address_t */
-
-void test_dns_query()
-{
- tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
- tnet_dns_response_t *response = tsk_null;
- const tsk_list_item_t* item;
- const tnet_dns_rr_t* rr;
-
- //if((response = tnet_dns_resolve(ctx, "_sip._udp.sip2sip.info", qclass_in, qtype_srv)))
- if((response = tnet_dns_resolve(ctx, "sip2sip.info", qclass_in, qtype_naptr)))
- {
- if(TNET_DNS_RESPONSE_IS_SUCCESS(response)){
- TSK_DEBUG_INFO("We got a success response from the DNS server.");
- // loop through the answers
- tsk_list_foreach(item, response->Answers){
- rr = item->data;
- if(rr->qtype == qtype_naptr){
- const tnet_dns_naptr_t *naptr = (const tnet_dns_naptr_t*)rr;
-
- TSK_DEBUG_INFO("order=%u pref=%u flags=%s services=%s regexp=%s replacement=%s",
- naptr->order,
- naptr->preference,
- naptr->flags,
- naptr->services,
- naptr->regexp,
- naptr->replacement);
- }
- }
- }
- else{
- TSK_DEBUG_ERROR("We got an error response from the DNS server. Erro code: %u", response->Header.RCODE);
- }
- }
-
- tnet_dns_cache_clear(ctx);
-
- TSK_OBJECT_SAFE_FREE(response);
- TSK_OBJECT_SAFE_FREE(ctx);
-
-
- tsk_thread_sleep(2000);
-}
-
-void test_dns_srv()
-{
- tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
- char* hostname = 0;
- tnet_port_t port = 0;
-
- if(!tnet_dns_query_srv(ctx, "_sip._udp.sip2sip.info", &hostname, &port)){
- TSK_DEBUG_INFO("DNS SRV succeed ==> hostname=%s and port=%u", hostname, port);
- }
-
- TSK_FREE(hostname);
- TSK_OBJECT_SAFE_FREE(ctx);
-
- tsk_thread_sleep(2000);
-}
-
-void test_dns_naptr_srv()
-{
- tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
- char* hostname = tsk_null;
- tnet_port_t port = 0;
-
- if(!tnet_dns_query_naptr_srv(ctx, "sip2sip.info", "SIP+D2U", &hostname, &port)){
- TSK_DEBUG_INFO("DNS NAPTR+SRV succeed ==> hostname=%s and port=%u", hostname, port);
- }
-
- TSK_FREE(hostname);
- TSK_OBJECT_SAFE_FREE(ctx);
-
- tsk_thread_sleep(2000);
-}
-
-void test_enum()
-{
- tnet_dns_ctx_t *ctx = tnet_dns_ctx_create();
- tnet_dns_response_t* response = tsk_null;
-// const tsk_list_item_t* item;
-// const tnet_dns_naptr_t* record;
- char* uri = tsk_null;
- const char* e164num = "+1-800-555-5555";
- //const char* e164num = "+33660188661";
-
- //tnet_dns_add_server(ctx, "192.168.16.9");
-
- //if((uri = tnet_dns_enum_2(ctx, "E2U+SIP", e164num, "e164.org"))){
- if((uri = tnet_dns_enum_2(ctx, "E2U+SIP", e164num, "e164.org"))){
- TSK_DEBUG_INFO("URI=%s", uri);
- TSK_FREE(uri);
- }
- else{
- TSK_DEBUG_ERROR("ENUM(%s) failed", e164num);
- }
-
- /*if((response = tnet_dns_enum(ctx, "+1-800-555-5555", "e164.org"))){
- if(TNET_DNS_RESPONSE_IS_SUCCESS(response)){
- TSK_DEBUG_INFO("We got a success response from the DNS server.");
- // loop through the answers
- tsk_list_foreach(item, response->Answers){
- record = item->data;
-
- TSK_DEBUG_INFO("order=%u pref=%u flags=%s services=%s regexp=%s replacement=%s",
- record->order,
- record->preference,
- record->flags,
- record->services,
- record->regexp,
- record->replacement);
- }
- }
- else{
- TSK_DEBUG_ERROR("We got an error response from the DNS server. Erro code: %u", response->Header.RCODE);
- }
- }*/
-
-
- TSK_OBJECT_SAFE_FREE(response);
- TSK_OBJECT_SAFE_FREE(ctx);
-
- tsk_thread_sleep(2000);
-}
-
-
-typedef struct regexp_test_s{
- const char* e164num;
- const char* regexp;
- const char* xres;
-}
-regexp_test_t;
-
-regexp_test_t regexp_tests[] = {
- "+18005551234", "!^.*$!sip:customer-service@example.com!i", "sip:customer-service@example.com",
- "+18005551234", "!^.*$!mailto:information@example.com!i", "mailto:information@example.com",
-
- "+18005555555", "!^\\+1800(.*)$!sip:1641641800\\1@tollfree.sip-happens.com!", "sip:16416418005555555@tollfree.sip-happens.com",
- "+18005555555", "!^\\+1800(.*)$!sip:1641641800\\1@sip.tollfreegateway.com!", "sip:16416418005555555@sip.tollfreegateway.com",
-
- "+468971234", "!^+46(.*)$!ldap://ldap.telco.se/cn=0\\1!", "ldap://ldap.telco.se/cn=08971234",
- "+468971234", "!^+46(.*)$!mailto:spam@paf.se!", "mailto:spam@paf.se",
-
- "urn:cid:199606121851.1@bar.example.com", "!!^urn:cid:.+@([^\\.]+\\.)(.*)$!\\2!i", "example.com",
-};
-
-void test_regex()
-{
- char* ret;
- size_t i;
-
- for(i=0; i< sizeof(regexp_tests)/sizeof(regexp_test_t); i++)
- {
- if((ret = tnet_dns_regex_parse(regexp_tests[i].e164num, regexp_tests[i].regexp))){
- TSK_DEBUG_INFO("ENUM(%s) = %s", regexp_tests[i].e164num, ret);
- if(!tsk_strequals(ret, regexp_tests[i].xres)){
- TSK_DEBUG_ERROR("Failed to match ENUM(%s)", regexp_tests[i].e164num);
- }
- TSK_FREE(ret);
- }
- else{
- TSK_DEBUG_ERROR("Failed to parse ENUM(%s)", regexp_tests[i].e164num);
- }
-
- TSK_DEBUG_INFO("---------");
- }
-}
-
-void test_resolvconf()
-{
- tnet_addresses_L_t * servers;
- const tnet_address_t* address;
- const tsk_list_item_t* item;
- const char* path = "C:\\tmp\\resolv32.conf";
- //const char* path = "C:\\tmp\\resolv.conf";
- //const char* path = "/etc/resolv.conf";
-
- if((servers = tnet_dns_resolvconf_parse(path))){
- tsk_list_foreach(item, servers){
- address = item->data;
-
- TSK_DEBUG_INFO("DNS Server host=%s Family=%d", address->ip, address->family);
- }
-
- TSK_OBJECT_SAFE_FREE(servers);
- }
- else{
- TSK_DEBUG_ERROR("Failed to parse DNS servers from %s.", path);
- }
-}
-
-void test_dns()
-{
- //test_dns_naptr_srv();
- //test_dns_srv();
- //test_dns_query();
- test_enum();
- //test_regex();
- //test_resolvconf();
-}
-
-
-#endif /* TNET_TEST_DNS_H */
diff --git a/branches/1.0/tinyNET/test/test_ifaces.h b/branches/1.0/tinyNET/test/test_ifaces.h
deleted file mode 100644
index a3bb411..0000000
--- a/branches/1.0/tinyNET/test/test_ifaces.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou@yahoo.fr>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_IFACES_H
-#define TNET_TEST_IFACES_H
-
-void test_faces_bestsource()
-{
- tnet_ip_t source;
-
- // IPv6
- if(!tnet_getbestsource("fe80::fe4c:3ea1", 5060, tnet_socket_type_udp_ipv6, &source)){
- TSK_DEBUG_INFO("Best IPv6 source is [%s]", source);
- }
- else{
- TSK_DEBUG_ERROR("Failed to get best IPv6 source.");
- }
- // IPv6
- if(!tnet_getbestsource("2a01:e35:8b32:7050:212:f0ff:fe4c:3ea1", 5060, tnet_socket_type_udp_ipv6, &source)){
- TSK_DEBUG_INFO("Best IPv6 source is [%s]", source);
- }
- else{
- TSK_DEBUG_ERROR("Failed to get best IPv6 source.");
- }
- // IPv4
- if(!tnet_getbestsource("192.168.0.11", 5060, tnet_socket_type_udp_ipv4, &source)){
- TSK_DEBUG_INFO("Best IPv4 source is [%s]", source);
- }
- else{
- TSK_DEBUG_ERROR("Failed to get best IPv4 source.");
- }
-}
-
-void test_ifaces_dump_ifaces()
-{
- tnet_interfaces_L_t* ifaces = tnet_get_interfaces();
- tsk_list_item_t *item;
-
- tsk_list_foreach(item, ifaces)
- {
- const tnet_interface_t *iface = item->data;
- TSK_DEBUG_INFO("Interface: %s", iface->description);
- }
-
- TSK_OBJECT_SAFE_FREE(ifaces);
-}
-
-void test_ifaces_dump_addresses()
-{
- tnet_addresses_L_t* addresses = tnet_get_addresses_all();
- tsk_list_item_t *item;
-
- tsk_list_foreach(item, addresses)
- {
- const tnet_address_t *address = item->data;
- if(address->anycast)
- {
- TSK_DEBUG_INFO("ANYCAST address: %s", address->ip);
- }
- else if(address->unicast)
- {
- TSK_DEBUG_INFO("UNICAST address: %s", address->ip);
- }
- else if(address->multicast)
- {
- TSK_DEBUG_INFO("MULTICAST address: %s", address->ip);
- }
- else if(address->dnsserver)
- {
- TSK_DEBUG_INFO("DNSSERVER address: %s", address->ip);
- }
- }
-
- TSK_OBJECT_SAFE_FREE(addresses);
-}
-
-void test_ifaces()
-{
- test_faces_bestsource();
- test_ifaces_dump_ifaces();
- test_ifaces_dump_addresses();
-}
-
-#endif /* TNET_TEST_IFACES_H */
diff --git a/branches/1.0/tinyNET/test/test_nat.h b/branches/1.0/tinyNET/test/test_nat.h
deleted file mode 100644
index ac1e4cb..0000000
--- a/branches/1.0/tinyNET/test/test_nat.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_NAT_H
-#define TNET_TEST_NAT_H
-
-//stun.ekiga.net
-//#define STUN_SERVER_IP "numb.viagenie.ca"
-#define STUN_SERVER_IP "numb.viagenie.ca"
-#define STUN_USERNAME "xxxxx"
-#define STUN_PASSWORD "xxxxx"
-#define STUN_SERVER_PORT TNET_STUN_TCP_UDP_DEFAULT_PORT
-#define STUN_SERVER_PROTO tnet_socket_type_udp_ipv4
-
-void test_nat_stun()
-{
- tnet_socket_t *socket1 = 0, *socket2 = 0;
- tnet_nat_context_handle_t *context = 0;
-
- tnet_stun_binding_id_t bind_id1, bind_id2;
-
- char* public_ip1 = 0, *public_ip2 = 0;
- tnet_port_t public_port1 = 0, public_port2 = 0;
-
- if(!(socket1 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, STUN_SERVER_PROTO))
- || !(socket2 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, STUN_SERVER_PROTO)))
- {
- goto bail;
- }
-
- context = tnet_nat_context_create(STUN_SERVER_PROTO, STUN_USERNAME, STUN_PASSWORD);
-
- if(tnet_nat_set_server_address(context, STUN_SERVER_IP))
- {
- TSK_DEBUG_ERROR("Failed to set STUN/TURN address.");
- goto bail;
- }
-
- /* == BIND
- */
- bind_id1 = tnet_nat_stun_bind(context, socket1->fd);
- bind_id2 = tnet_nat_stun_bind(context, socket2->fd);
-
- if(!TNET_STUN_IS_VALID_BINDING_ID(bind_id1) ||!TNET_STUN_IS_VALID_BINDING_ID(bind_id2))
- {
- TSK_DEBUG_ERROR("Failed to get public IP/port using stun");
- goto bail;
- }
-
- if(!tnet_nat_stun_get_reflexive_address(context, bind_id1, &public_ip1, &public_port1))
- {
- TSK_DEBUG_INFO("Public IP1/Port1 ==> %s:%u", public_ip1, public_port1);
- }
-
- if(!tnet_nat_stun_get_reflexive_address(context, bind_id2, &public_ip2, &public_port2))
- {
- TSK_DEBUG_INFO("Public IP2/Port2 ==> %s:%u", public_ip2, public_port2);
- }
-
- /* == UNBIND
- */
- tnet_nat_stun_unbind(context, bind_id1);
- tnet_nat_stun_unbind(context, bind_id2);
-
-bail:
- TSK_OBJECT_SAFE_FREE(socket1);
- TSK_OBJECT_SAFE_FREE(socket2);
-
- TSK_FREE(public_ip1);
- TSK_FREE(public_ip1);
-
- TSK_OBJECT_SAFE_FREE(context);
-}
-
-void test_nat_turn()
-{
- tnet_socket_t *socket1 = 0, *socket2 = 0;
- tnet_nat_context_handle_t *context = 0;
- tnet_turn_allocation_id_t alloc_id1, alloc_id2;
-
- char* public_ip1 = 0, *public_ip2 = 0;
- tnet_port_t public_port1 = 0, public_port2 = 0;
-
- tnet_turn_channel_binding_id_t channel_id;
-
- int ret;
-
- if(!(socket1 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, STUN_SERVER_PROTO))
- || !(socket2 = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, STUN_SERVER_PROTO)))
- {
- goto bail;
- }
-
- context = tnet_nat_context_create(STUN_SERVER_PROTO, STUN_USERNAME, STUN_PASSWORD);
-
- if(tnet_nat_set_server_address(context, STUN_SERVER_IP))
- {
- TSK_DEBUG_ERROR("Failed to set STUN/TURN address.");
- goto bail;
- }
-
- /* == ALLOC
- */
- alloc_id1 = tnet_nat_turn_allocate(context, socket1->fd);
- alloc_id2 = tnet_nat_turn_allocate(context, socket2->fd);
- if(!TNET_TURN_IS_VALID_ALLOCATION_ID(alloc_id1) || !TNET_TURN_IS_VALID_ALLOCATION_ID(alloc_id2))
- {
- TSK_DEBUG_ERROR("TURN allocation failed.");
- goto bail;
- }
- else
- {
- TSK_DEBUG_INFO("TURN allocation succeeded and id1=%llu and id2=%llu", alloc_id1, alloc_id2);
- }
-
- tsk_thread_sleep(2000);
-
- /* == RETRIEVE STUN SERVER REFLEXIVE ADDRESSES
- */
- if(!tnet_nat_turn_get_reflexive_address(context, alloc_id1, &public_ip1, &public_port1))
- {
- TSK_DEBUG_INFO("Public IP1/Port1 ==> %s:%u", public_ip1, public_port1);
- }
-
- if(!tnet_nat_turn_get_reflexive_address(context, alloc_id2, &public_ip2, &public_port2))
- {
- TSK_DEBUG_INFO("Public IP2/Port2 ==> %s:%u", public_ip2, public_port2);
- }
-
- /* == CREATE PERMISSION
- */
- //tnet_nat_turn_add_permission(context, alloc_id1, "192.168.0.11", 300);
-
- /* == CHANNEL BINDING
- */
- {
- /* Try to bind (channel binding) to the socket1 to socket2 */
- struct sockaddr_storage peer;
- if((ret = tnet_sockaddr_init(public_ip2, public_port2, STUN_SERVER_PROTO, &peer)))
- {
- TSK_DEBUG_ERROR("Failed to init peer with error code %d.", ret);
- }
- else
- {
- channel_id = tnet_nat_turn_channel_bind(context, alloc_id1,&peer);
- if(TNET_TURN_IS_VALID_CHANNEL_BINDING_ID(channel_id))
- {
- TSK_DEBUG_INFO("TURN channel binding succeeded.");
-
- /* Try to send data using the newly create channel */
- if(tnet_nat_turn_channel_senddata(context, channel_id, "Doubango", strlen("Doubango")))
- {
- TSK_DEBUG_ERROR("Failed to send data using channel id [%u].", channel_id);
- }
- else
- {
- TSK_DEBUG_INFO("Data successfuly sent using channel if[%u].", channel_id);
- }
- }
- else
- {
- TSK_DEBUG_ERROR("TURN channel binding failed.");
- }
- }
- }
-
- tsk_thread_sleep(2000);
-
- /* == UNALLOC
- */
- if((ret = tnet_nat_turn_unallocate(context, alloc_id1)) || (ret = tnet_nat_turn_unallocate(context, alloc_id2)))
- {
- TSK_DEBUG_ERROR("TURN unallocation failed with error code: %d.", ret);
- goto bail;
- }
- else
- {
- TSK_DEBUG_INFO("TURN unallocation succeeded.");
- }
-
-bail:
- TSK_OBJECT_SAFE_FREE(socket1);
- TSK_OBJECT_SAFE_FREE(socket2);
-
- TSK_FREE(public_ip1);
- TSK_FREE(public_ip1);
-
- TSK_OBJECT_SAFE_FREE(context);
-}
-
-
-void test_nat()
-{
- test_nat_stun();
- //test_nat_turn();
- //tsk_thread_sleep(1000);
-}
-
-
-
-#endif /* TNET_TEST_NAT_H */
diff --git a/branches/1.0/tinyNET/test/test_sockets.h b/branches/1.0/tinyNET/test/test_sockets.h
deleted file mode 100644
index 32e1cca..0000000
--- a/branches/1.0/tinyNET/test/test_sockets.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_SOCKETS_H
-#define TNET_TEST_SOCKETS_H
-
-void test_sockets()
-{
- int test;
- tnet_socket_tcp_t * tcp_socket;
- tnet_socket_type_t type = tnet_socket_type_udp_ipv4;
- struct sockaddr_storage to;
-
- TNET_SOCKET_TYPE_SET_IPV4(type);
- TNET_SOCKET_TYPE_SET_IPV6(type);
- TNET_SOCKET_TYPE_SET_IPV4Only(type);
- TNET_SOCKET_TYPE_SET_IPV6Only(type);
- TNET_SOCKET_TYPE_SET_IPV6Only(type);
- TNET_SOCKET_TYPE_SET_IPV4(type);
- TNET_SOCKET_TYPE_SET_IPV6(type);
-
- TNET_SOCKET_TYPE_SET_TLS(type);
- TNET_SOCKET_TYPE_SET_UDP(type);
- TNET_SOCKET_TYPE_SET_SCTP(type);
- TNET_SOCKET_TYPE_SET_TCP(type);
-
- tcp_socket = tnet_socket_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, type);
-
- if(!TNET_SOCKET_IS_VALID(tcp_socket))
- {
- TSK_OBJECT_SAFE_FREE(tcp_socket);
- return;
- }
-
- //if(!(test = tnet_sockaddr_init("www.google.com", 80, type, &to))){
- // test = tnet_sockfd_connetto(tcp_socket->fd, (const struct sockaddr_storage *)&to);
- //}
-
- if(!(test = tnet_sockaddr_init("ipv6.google.com", 80, type, &to))){
- test = tnet_sockfd_connectto(tcp_socket->fd, (const struct sockaddr_storage *)&to);
- }
-
- TSK_OBJECT_SAFE_FREE(tcp_socket);
-}
-
-#endif /* TNET_TEST_SOCKETS_H */
diff --git a/branches/1.0/tinyNET/test/test_stun.h b/branches/1.0/tinyNET/test/test_stun.h
deleted file mode 100644
index 4209f03..0000000
--- a/branches/1.0/tinyNET/test/test_stun.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_STUN_H
-#define TNET_TEST_STUN_H
-
-//#define STUN_SERVER_IP "numb.viagenie.ca"
-//#define STUN_SERVER_PORT TNET_STUN_TCP_UDP_DEFAULT_PORT
-//#define STUN_SERVER_PROTO tnet_socket_type_udp_ipv4
-
-// http://tools.ietf.org/html/draft-ietf-behave-stun-test-vectors-04
-
-void test_stun_dump_transacid(tnet_stun_transacid_t transcid)
-{
- char transac_idstriing[TNET_STUN_TRANSACID_SIZE*2+1];
- tsk_str_from_hex(transcid, TNET_STUN_TRANSACID_SIZE, transac_idstriing);
-
- transac_idstriing[sizeof(transac_idstriing)-1] = '\0';
-
- TSK_DEBUG_INFO("STUN transac id:%s", transac_idstriing);
-}
-
-void test_sun_sendMessage()
-{
- /*tnet_stun_message_handle_t *message = 0;
- tsk_buffer_t *buffer = 0;
- tnet_socket_t *socket = 0;
- struct sockaddr_storage to;
-
-
- message = TNET_STUN_MESSAGE_CREATE();
- tnet_stun_message_set_type(message, tsm_binding_request);
- tnet_stun_message_set_random_transacid(message);
-
- if(!(buffer = tnet_stun_message_serialize(message)))
- {
- goto bail;
- }
-
- // Create blocking socket and bind it
- socket = tnet_socket_create_EX(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, STUN_SERVER_PROTO, 0);
- if(!TNET_SOCKET_IS_VALID(socket))
- {
- goto bail;
- }
-
- // Create stun server's sockaddr structure
- if(tnet_sockaddr_init(STUN_SERVER_IP, STUN_SERVER_PORT, STUN_SERVER_PROTO, &to))
- {
- goto bail;
- }
-
- tnet_socket_sendto(socket, (struct sockaddr*)&to, buffer->data, buffer->size);
-
-bail:
- TSK_OBJECT_SAFE_FREE(message);
- TSK_OBJECT_SAFE_FREE(socket);
- TSK_OBJECT_SAFE_FREE(buffer);*/
-}
-
-void test_stun_context()
-{
-// tnet_socket_t *localSocket = 0;
-// tnet_stun_context_t *context = 0;
-//
-// /* Somewhere in Your application ==> Create and bind your local socket
-// */
-// if(!(localSocket = tnet_socket_create_EX(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, STUN_SERVER_PROTO, 0)))
-// {
-// goto bail;
-// }
-//
-// /* Create your STUN2 context
-// */
-// if(!(context = TNET_STUN_CONTEXT_CREATE("myusername", "mypassword", localSocket->fd)))
-// {
-// goto bail;
-// }
-//
-// tnet_stun_resolve(context, STUN_SERVER_IP, STUN_SERVER_PORT, STUN_SERVER_PROTO);
-//
-//bail:
-// TNET_OBJECT_SAFE_FREE(localSocket);
-// TNET_OBJECT_SAFE_FREE(context);
-}
-
-void test_stun()
-{
- //test_stun_transacid();
- //test_sun_sendMessage();
- test_stun_context();
-}
-
-#endif /* TNET_TEST_STUN_H */
diff --git a/branches/1.0/tinyNET/test/test_tls.h b/branches/1.0/tinyNET/test/test_tls.h
deleted file mode 100644
index ff86823..0000000
--- a/branches/1.0/tinyNET/test/test_tls.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_TLS_H
-#define TNET_TEST_TLS_H
-
-#define TEST_TLS_REMOTE_IP "192.168.16.225"
-#define TEST_TLS_REMOTE_PORT 4061
-
-#define TLS_TEST_SIP_MESSAGE \
- "REGISTER sip:micromethod.com SIP/2.0\r\n" \
- "Via: SIP/2.0/%s %s:%d;rport;branch=z9hG4bK1245420841406%d\r\n" \
- "From: <sip:mamadou@micromethod.com>;tag=29358\r\n" \
- "To: <sip:mamadou@micromethod.com>\r\n" \
- "Call-ID: M-fa53180346f7f55ceb8d8670f9223dbb\r\n" \
- "CSeq: 201 REGISTER\r\n" \
- "Max-Forwards: 70\r\n" \
- "Contact: <sip:mamadou@%s:%d;transport=%s>\r\n" \
- "Expires: 10\r\n" \
- "\r\n"
-
-static int tnet_tls_cb(const tnet_transport_event_t* e)
-{
- switch(e->type){
- case event_data:
- {
- TSK_DEBUG_INFO("--- TLS ---\n%s\n", (const char*)e->data);
- break;
- }
- case event_closed:
- case event_connected:
- default:
- {
- break;
- }
- }
- return 0;
-}
-
-
-void test_tls()
-{
- tnet_transport_handle_t *transport = tnet_transport_create(TNET_SOCKET_HOST_ANY, TNET_SOCKET_PORT_ANY, tnet_socket_type_tls_ipv4, "TLS/IPV4 TRANSPORT");
-
- tnet_ip_t ip;
- tnet_port_t port;
- tnet_fd_t fd = TNET_INVALID_FD;
-
- if(tnet_transport_start(transport)){
- TSK_DEBUG_ERROR("Failed to create %s.", tnet_transport_get_description(transport));
- return;
- }
-
- /* Set our callback function */
- tnet_transport_set_callback(transport, tnet_tls_cb, "callbackdata");
-
-
-
- /* Connect to the SIP Registrar */
- if((fd = tnet_transport_connectto_2(transport, TEST_TLS_REMOTE_IP, TEST_TLS_REMOTE_PORT)) == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Failed to connect %s.", tnet_transport_get_description(transport));
- return;
- }
-
- if(tnet_sockfd_waitUntilWritable(fd, TNET_CONNECT_TIMEOUT)){
- TSK_DEBUG_ERROR("%d milliseconds elapsed and the socket is still not connected.", TNET_CONNECT_TIMEOUT);
- tnet_transport_remove_socket(transport, &fd);
- return;
- }
-
- /* Send our SIP message */
- {
- char* message = 0;
- tnet_transport_get_ip_n_port(transport, fd, &ip, &port);
- tsk_sprintf(&message, TLS_TEST_SIP_MESSAGE, "TLS", ip, port, port, ip, port, "tls");
-
- if(!tnet_transport_send(transport, fd, message, strlen(message)))
- {
- TSK_DEBUG_ERROR("Failed to send data using TCP/IPv4 transport.");
- TSK_FREE(message);
- return;
- }
- TSK_FREE(message);
- }
-
- TSK_OBJECT_SAFE_FREE(transport);
-}
-
-#endif /* TNET_TEST_TLS_H */
-
diff --git a/branches/1.0/tinyNET/test/test_transport.h b/branches/1.0/tinyNET/test/test_transport.h
deleted file mode 100644
index 870c8b5..0000000
--- a/branches/1.0/tinyNET/test/test_transport.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-* Copyright (C) 2009 Mamadou Diop.
-*
-* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
-* This file is part of Open Source Doubango Framework.
-*
-* DOUBANGO 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.
-*
-* DOUBANGO 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 Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with DOUBANGO.
-*
-*/
-#ifndef TNET_TEST_TRANSPORT_H
-#define TNET_TEST_TRANSPORT_H
-
-//#define REMOTE_IP4 "proxy.sipthor.net"//"192.168.0.15"
-#define REMOTE_IP4 "192.168.0.13"
-#define REMOTE_IP6 "2a01:e35:8632:7050:6122:2706:2124:32cb"
-#define REMOTE_IP REMOTE_IP4
-#define REMOTE_PORT 5083
-
-#if defined(ANDROID) /* FIXME */
-# define LOCAL_IP4 "10.0.2.15"
-#else
-# define LOCAL_IP4 TNET_SOCKET_HOST_ANY
-#endif
-#define LOCAL_IP6 TNET_SOCKET_HOST_ANY
-
-#if defined(ANDROID)
-# define LOCAL_PORT 5060
-#else
-# define LOCAL_PORT TNET_SOCKET_PORT_ANY
-#endif
-
-#define SIP_MESSAGE \
- "REGISTER sip:micromethod.com SIP/2.0\r\n" \
- "Via: SIP/2.0/%s %s:%d;rport;branch=z9hG4bK1245420841406%d\r\n" \
- "From: <sip:mamadou@micromethod.com>;tag=29358\r\n" \
- "To: <sip:mamadou@micromethod.com>\r\n" \
- "Call-ID: M-fa53180346f7f55ceb8d8670f9223dbb\r\n" \
- "CSeq: 201 REGISTER\r\n" \
- "Max-Forwards: 70\r\n" \
- "Contact: <sip:mamadou@%s:%d;transport=%s>\r\n" \
- "Expires: 10\r\n" \
- "\r\n"
-
-
-static int tnet_tcp_cb(const tnet_transport_event_t* e)
-{
- switch(e->type){
- case event_data:
- {
- TSK_DEBUG_INFO("--- TCP ---\n%s\n", (const char*)e->data);
- break;
- }
- case event_closed:
- case event_connected:
- default:
- {
- break;
- }
- }
- return 0;
-}
-
-static int tnet_udp_cb(const tnet_transport_event_t* e)
-{
- switch(e->type){
- case event_data:
- {
- TSK_DEBUG_INFO("--- UDP ---\n%s\n", (const char*)e->data);
- break;
- }
- case event_closed:
- case event_connected:
- default:
- {
- break;
- }
- }
- return 0;
-}
-
-void test_transport_tcp_ipv4(tnet_transport_handle_t *transport)
-{
- //tnet_socket_type_t type = tnet_socket_type_tcp_ipv4;
- tnet_ip_t ip;
- tnet_port_t port;
- tnet_fd_t fd = TNET_INVALID_FD;
-
- /* Set our callback function */
- tnet_transport_set_callback(transport, tnet_tcp_cb, "callbackdata");
-
- if(tnet_transport_start(transport)){
- TSK_DEBUG_ERROR("Failed to create %s.", tnet_transport_get_description(transport));
- return;
- }
-
- /* Connect to the SIP Registrar */
- if((fd = tnet_transport_connectto_2(transport, REMOTE_IP, REMOTE_PORT)) == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Failed to connect %s.", tnet_transport_get_description(transport));
- return;
- }
-
- if(tnet_sockfd_waitUntilWritable(fd, TNET_CONNECT_TIMEOUT)){
- TSK_DEBUG_ERROR("%d milliseconds elapsed and the socket is still not connected.", TNET_CONNECT_TIMEOUT);
- tnet_transport_remove_socket(transport, &fd);
- return;
- }
-
-
- /* Send our SIP message */
- {
- char* message = 0;
- tnet_transport_get_ip_n_port(transport, fd, &ip, &port);
- tsk_sprintf(&message, SIP_MESSAGE, "TCP", ip, port, port, ip, port, "tcp");
-
- if(!tnet_transport_send(transport, fd, message, strlen(message)))
- {
- TSK_DEBUG_ERROR("Failed to send data using %s.", tnet_transport_get_description(transport));
- TSK_FREE(message);
- return;
- }
- TSK_FREE(message);
- }
-
-}
-
-
-int test_transport_udp_ipv4(tnet_transport_handle_t *transport)
-{
- //tnet_socket_type_t type = tnet_socket_type_udp_ipv4;
- tnet_ip_t ip;
- tnet_port_t port;
- tnet_fd_t fd = TNET_INVALID_FD;
-
- /* Set our callback function */
- tnet_transport_set_callback(transport, tnet_udp_cb, "callbackdata");
-
- if(tnet_transport_start(transport)){
- TSK_DEBUG_ERROR("Failed to create %s.", tnet_transport_get_description(transport));
- return -1;
- }
-
- /* Connect to our SIP REGISTRAR */
- if((fd = tnet_transport_connectto_2(transport, REMOTE_IP, REMOTE_PORT)) == TNET_INVALID_FD){
- TSK_DEBUG_ERROR("Failed to connect %s.", tnet_transport_get_description(transport));
- //tnet_transport_shutdown(transport);
- return -2;
- }
-
- if(tnet_sockfd_waitUntilWritable(fd, TNET_CONNECT_TIMEOUT)){
- TSK_DEBUG_ERROR("%d milliseconds elapsed and the socket is still not connected.", TNET_CONNECT_TIMEOUT);
- tnet_transport_remove_socket(transport, &fd);
- return -3;
- }
-
- //tsk_thread_sleep(2000);
-
- /* Send our SIP message */
- /*while(1)*/{
- char* message = 0;
- tnet_transport_get_ip_n_port(transport, fd, &ip, &port);
- //memset(ip, 0, sizeof(ip));
- //memcpy(ip, "192.168.0.12", 12);
- tsk_sprintf(&message, SIP_MESSAGE, "UDP", ip, port, port, ip, port, "udp");
-
- if(!tnet_transport_send(transport, fd, message, strlen(message)))
- {
- TSK_DEBUG_ERROR("Failed to send data using %s.", tnet_transport_get_description(transport));
- //tnet_transport_shutdown(transport);
- TSK_FREE(message);
- return -4;
- }
- TSK_FREE(message);
- }
-
- return 0;
-}
-
-void test_transport()
-{
-#define TEST_TCP 1
-#define TEST_UDP 0
-
-
-#if TEST_UDP
- tnet_transport_handle_t *udp = tnet_transport_create(LOCAL_IP4, LOCAL_PORT, tnet_socket_type_udp_ipv4, "UDP/IPV4 TRANSPORT");
- test_transport_udp_ipv4(udp);
-#endif
-
-#if TEST_TCP
- tnet_transport_handle_t *tcp = tnet_transport_create(LOCAL_IP4, LOCAL_PORT, tnet_socket_type_tcp_ipv4, "TCP/IPV4 TRANSPORT");
- test_transport_tcp_ipv4(tcp);
-#endif
-
-//#if defined(ANDROID)
- tsk_thread_sleep(1000000);
-//#else
- getchar();
-//#endif
-
-#if TEST_UDP
- TSK_OBJECT_SAFE_FREE(udp);
-#endif
-
-#if TEST_TCP
- TSK_OBJECT_SAFE_FREE(tcp);
-#endif
-}
-
-
-#endif /* TNET_TEST_TRANSPORT_H*/
diff --git a/branches/1.0/tinyNET/tinyNET.sln b/branches/1.0/tinyNET/tinyNET.sln
deleted file mode 100644
index b800c12..0000000
--- a/branches/1.0/tinyNET/tinyNET.sln
+++ /dev/null
@@ -1,44 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyNET", "tinyNET.vcproj", "{7522A458-92F4-4259-B906-E84C2A65D9F1}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- Release|Win32 = Release|Win32
- Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.ActiveCfg = Debug|Win32
- {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.Build.0 = Debug|Win32
- {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.ActiveCfg = Release|Win32
- {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.Build.0 = Release|Win32
- {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Debug|Win32.ActiveCfg = Debug|Win32
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Debug|Win32.Build.0 = Debug|Win32
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Release|Win32.ActiveCfg = Release|Win32
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Release|Win32.Build.0 = Release|Win32
- {2189FB5C-B2B2-4ED2-8A78-64853B55DAD5}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/branches/1.0/tinyNET/tinyNET.tag b/branches/1.0/tinyNET/tinyNET.tag
deleted file mode 100644
index 27702f5..0000000
--- a/branches/1.0/tinyNET/tinyNET.tag
+++ /dev/null
@@ -1,14862 +0,0 @@
-<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
-<tagfile>
- <compound kind="page">
- <name>index</name>
- <title>tinyNET API Overview</title>
- <filename>index</filename>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp_8c</filename>
- <includes id="tnet__dhcp_8h" name="tnet_dhcp.h" local="yes" imported="no">tnet_dhcp.h</includes>
- <includes id="tnet__endianness_8h" name="tnet_endianness.h" local="yes" imported="no">../tnet_endianness.h</includes>
- <member kind="function">
- <type>tnet_dhcp_ctx_t *</type>
- <name>tnet_dhcp_ctx_create</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga4047baa7341d04b728d5884460214802</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_params_t *</type>
- <name>tnet_dhcp_params_create</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga7d73362e75ec846e6ce440ba9178069a</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_reply_t *</type>
- <name>tnet_dhcp_send_request</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>gafd37386ea787357f72a4c71f8f66df4f</anchor>
- <arglist>(tnet_dhcp_ctx_t *ctx, tnet_dhcp_request_t *request)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_reply_t *</type>
- <name>tnet_dhcp_query</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga66e173bcf5fd24b06a204be44312c56a</anchor>
- <arglist>(tnet_dhcp_ctx_t *ctx, tnet_dhcp_message_type_t type, tnet_dhcp_params_t *params)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_params_add_code</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga9fb8994c0bb692b29ccd0454cc592bc5</anchor>
- <arglist>(tnet_dhcp_params_t *params, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_ctx_def_t</name>
- <anchorfile>tnet__dhcp_8c.html</anchorfile>
- <anchor>aa58d75ace9326fe257d66da67933825e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_params_def_t</name>
- <anchorfile>tnet__dhcp_8c.html</anchorfile>
- <anchor>a15f3b7d6540c0da1287fe092220e7dee</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dhcp__message_8h" name="tnet_dhcp_message.h" local="yes" imported="no">tnet_dhcp_message.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <class kind="struct">tnet_dhcp_params_s</class>
- <class kind="struct">tnet_dhcp_ctx_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga4c4d364928ec9c9b7c2dbc6d59187b94</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_CLIENT_PORT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga40d19eada507a56dd275125e3b1c195c</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_SERVER_PORT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>gae5229a21da05427c690040fa34a6a2b3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_VENDOR_ID_DEFAULT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga68fdef222cf61845b6d961766b4cf276</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MAX_CODES</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga2e7d7c17df6e0c697014a20ab344d1a8</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MAX_MSG_SIZE</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga9489b2e11946fde982adc9f88a148e5c</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_dhcp_query_discover</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>aedc60f87e2d0b05b0986eafe0d720322</anchor>
- <arglist>(ctx, params)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_dhcp_query_request</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>a0df10b4454c97b7612cfbcb581ef684b</anchor>
- <arglist>(ctx, params)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_dhcp_query_decline</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>a782749ba0da4d5e477f1e69f8483073d</anchor>
- <arglist>(ctx, params)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_dhcp_query_release</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>abf827e1e98d86cf6618c5dac9c10d39d</anchor>
- <arglist>(ctx, params)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_dhcp_query_inform</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>a85d77babd4233b7bc6009a312e10c326</anchor>
- <arglist>(ctx, params)</arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_params_s</type>
- <name>tnet_dhcp_params_t</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga6fc1dfe6651b6c630b32fb6744a269e9</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_ctx_s</type>
- <name>tnet_dhcp_ctx_t</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>gab40673583cd866001d0afc7db3e01e59</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_reply_t *</type>
- <name>tnet_dhcp_query</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga66e173bcf5fd24b06a204be44312c56a</anchor>
- <arglist>(tnet_dhcp_ctx_t *ctx, tnet_dhcp_message_type_t type, tnet_dhcp_params_t *params)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_dhcp_params_add_code</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga9fb8994c0bb692b29ccd0454cc592bc5</anchor>
- <arglist>(tnet_dhcp_params_t *params, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_ctx_t *</type>
- <name>tnet_dhcp_ctx_create</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga4047baa7341d04b728d5884460214802</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_params_t *</type>
- <name>tnet_dhcp_params_create</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga7d73362e75ec846e6ce440ba9178069a</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_ctx_def_t</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>ae5301bee980eef0385c17c41b962aa4e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_params_def_t</name>
- <anchorfile>tnet__dhcp_8h.html</anchorfile>
- <anchor>a8d6a9c960bfc72dc4226975e2ac545a2</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp_message.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp__message_8c</filename>
- <includes id="tnet__dhcp__message_8h" name="tnet_dhcp_message.h" local="yes" imported="no">tnet_dhcp_message.h</includes>
- <includes id="tnet__dhcp_8h" name="tnet_dhcp.h" local="yes" imported="no">tnet_dhcp.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">../tnet_utils.h</includes>
- <member kind="function">
- <type>tnet_dhcp_message_t *</type>
- <name>tnet_dhcp_message_create</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>adaf70c6f4ce8d349f9384427ef62769f</anchor>
- <arglist>(tnet_dhcp_message_op_t opcode)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_request_t *</type>
- <name>tnet_dhcp_request_create</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>aff1cfddd83d0cab8d5ae460ef6b64e72</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_message_t *</type>
- <name>tnet_dhcp_reply_create</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>a9ecc81df46370cec3691acc48339a273</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dhcp_message_serialize</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>adeb1e06721751ce944cb3b5b7b4fba72</anchor>
- <arglist>(const tnet_dhcp_ctx_t *ctx, const tnet_dhcp_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_message_t *</type>
- <name>tnet_dhcp_message_deserialize</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>aacd32aa714f4873545d046d96da49a2e</anchor>
- <arglist>(const struct tnet_dhcp_ctx_s *ctx, const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_dhcp_option_t *</type>
- <name>tnet_dhcp_message_find_option</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>a2b229a376755970e8ac2d2eea2c7ff24</anchor>
- <arglist>(const tnet_dhcp_message_t *message, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_message_add_codes</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>aed293c9712d53931456c003b566abbd4</anchor>
- <arglist>(tnet_dhcp_message_t *self, tnet_dhcp_option_code_t codes[], unsigned codes_count)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_message_def_t</name>
- <anchorfile>tnet__dhcp__message_8c.html</anchorfile>
- <anchor>a001d2d362157b75638399472c448348e</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp_message.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp__message_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dhcp__option_8h" name="tnet_dhcp_option.h" local="yes" imported="no">tnet_dhcp_option.h</includes>
- <includes id="tnet__hardwares_8h" name="tnet_hardwares.h" local="yes" imported="no">tnet_hardwares.h</includes>
- <class kind="struct">tnet_dhcp_message_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MESSAGE_IS_REQUEST</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>ae2e302cbcea8869129bcc91161428d81</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MESSAGE_IS_REPLY</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>ab571915b071fb6ed6e577f8d68e0c3d6</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MAGIC_COOKIE</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a33f88fe4e708a2afc5a2b229bf22f821</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MESSAGE_MIN_SIZE</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>ad9883a8e753ae872d4883f561283add6</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dhcp_message_type_e</type>
- <name>tnet_dhcp_message_type_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a0ca808a6b2e6ae7bf7ce313f258cf346</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dhcp_message_op_e</type>
- <name>tnet_dhcp_message_op_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a89d25a994f6584c738384c18de0f8090</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_message_s</type>
- <name>tnet_dhcp_message_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a659f843c5d28cdf6294fbde36667bb3e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dhcp_messages_L_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>ae1f846a04b26fccc138b06cf931006ef</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dhcp_message_t</type>
- <name>tnet_dhcp_request_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a25e00e6e9184caed3b65675dfe7604f1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dhcp_message_t</type>
- <name>tnet_dhcp_reply_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a6486614e440217fbb7d794f0c160a89f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp_message_type_e</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_discover</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a23945bd14286dcfe8684e72907eb8cef</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_offer</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a99a05a69b4ebabad25fa9ebffbd6f93f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_request</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a1f97becc1fd671298a8ffc840f280509</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_decline</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a6d1e6eb6c6f8003d9d44df59b8005472</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_ack</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905abaf0807c55fca70088fe1c9c40616023</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_nack</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a1bc59be9cf0b3a33f81185bded360513</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_release</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a149634ef5af759448d1c351d14372c2c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_type_inform</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a9ad24c42adb00d70b28a7ed0b62fe905a508ab5b809a40af17dd020c3e18cbd78</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp_message_op_e</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a1dc99290aacbbc3f78905c89a35a5e92</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_op_bootrequest</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a1dc99290aacbbc3f78905c89a35a5e92aa2edacd8fccb677b3700a851bc8b7d4a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_op_bootreply</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a1dc99290aacbbc3f78905c89a35a5e92a98bb49a25fe584d571047853182966d3</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dhcp_message_serialize</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>aad66010e56c32d932bda60f073f53fd5</anchor>
- <arglist>(const struct tnet_dhcp_ctx_s *ctx, const tnet_dhcp_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_message_t *</type>
- <name>tnet_dhcp_message_deserialize</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>aacd32aa714f4873545d046d96da49a2e</anchor>
- <arglist>(const struct tnet_dhcp_ctx_s *ctx, const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_dhcp_option_t *</type>
- <name>tnet_dhcp_message_find_option</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>ada261fbb37de7bc6e63a0596355a9d2c</anchor>
- <arglist>(const tnet_dhcp_message_t *self, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_message_add_codes</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>aed293c9712d53931456c003b566abbd4</anchor>
- <arglist>(tnet_dhcp_message_t *self, tnet_dhcp_option_code_t codes[], unsigned codes_count)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_message_t *</type>
- <name>tnet_dhcp_message_create</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a58ad2c16d636e848c247ab618addabb3</anchor>
- <arglist>(tnet_dhcp_message_op_t opcode)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_request_t *</type>
- <name>tnet_dhcp_request_create</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a58d28c4dfab786f9b53d28e15c86feeb</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_message_t *</type>
- <name>tnet_dhcp_reply_create</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a46fe33dfa57b8c43858b4445333851bf</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_message_def_t</name>
- <anchorfile>tnet__dhcp__message_8h.html</anchorfile>
- <anchor>a90d96e17271118fc819dd15d4c6545f7</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp_option.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp__option_8c</filename>
- <includes id="tnet__dhcp__option_8h" name="tnet_dhcp_option.h" local="yes" imported="no">tnet_dhcp_option.h</includes>
- <includes id="tnet__dhcp__option__sip_8h" name="tnet_dhcp_option_sip.h" local="yes" imported="no">tnet_dhcp_option_sip.h</includes>
- <member kind="function">
- <type>tnet_dhcp_option_t *</type>
- <name>tnet_dhcp_option_create</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>a8c191e2708eb2daf4e8386fa2f638830</anchor>
- <arglist>(tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_option_paramslist_t *</type>
- <name>tnet_dhcp_option_paramslist_create</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>acfb7f4858abc9bc7597f43c84209ca6b</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_option_dns_t *</type>
- <name>tnet_dhcp_option_dns_create</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>adda6aa01b12a617cee461a1406e4675d</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_init</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>aa86c774dfbc192fcf37731deac3009af</anchor>
- <arglist>(tnet_dhcp_option_t *self, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_deinit</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>aede9304d533f9fec7529149b345da1ae</anchor>
- <arglist>(tnet_dhcp_option_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_option_t *</type>
- <name>tnet_dhcp_option_deserialize</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>a4f9f1042f27b33be6150ce5a7eea09f8</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_serialize</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>a155a3fdeef17dc15f70dfe8ff41dddf7</anchor>
- <arglist>(const tnet_dhcp_option_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_serializeex</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>a01c369b06ee3e99ed20ec3bcb7a1ce16</anchor>
- <arglist>(tnet_dhcp_option_code_t code, uint8_t length, const void *value, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_paramslist_add_code</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>a08821769abef66cf1e459fb89ba442a2</anchor>
- <arglist>(tnet_dhcp_option_paramslist_t *self, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_def_t</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>a3ed2f79cb57a68233ab3d5c7cbb8f6b2</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_paramslist_def_t</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>ace02e02ac52286b3f0e8894e54d51f25</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_dns_def_t</name>
- <anchorfile>tnet__dhcp__option_8c.html</anchorfile>
- <anchor>abaf0ca973a723dea4becaaa62b28340f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp_option.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp__option_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <class kind="struct">tnet_dhcp_option_s</class>
- <class kind="struct">tnet_dhcp_option_paramslist_s</class>
- <class kind="struct">tnet_dhcp_option_dns_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_OPTION</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>aaaecef93a24661e93b845cff3e739374</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DECLARE_DHCP_OPTION</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a1215ccb86d8d3db9fb79e490e07a32e1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dhcp_option_code_e</type>
- <name>tnet_dhcp_option_code_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a0d884b63b7233a9e16b0403d57601832</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_option_s</type>
- <name>tnet_dhcp_option_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a8309fe5e24a8dd2452e8f94e6ddf9903</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dhcp_options_L_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a38aa38901b7e776af2652fc15fa55356</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_option_paramslist_s</type>
- <name>tnet_dhcp_option_paramslist_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>af36405ef3b15a68849ef0660905e0973</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_option_dns_s</type>
- <name>tnet_dhcp_option_dns_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a142e55f732f165a5c5148d62cf920647</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp_option_code_e</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Pad</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3db16c179b4e803c4727c6e06da3176a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Subnet_Mask</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a22afaeba4902bd5b93252d8f7565d91e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Time_Offset</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267acb1125be7938317663790fd5abdad638</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Router</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a53d4594993d9fa1333144da093207ca9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Time_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aa9014537e2e713c7445c469d8742e00e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Name_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a9e227834898d7fd25765c893ad57311d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Domain_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a455ac19797e8925d54828634afc57e53</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Log_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ae134f18d7811269d06871af23e124690</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Quotes_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ad2d3ef93abecf2ec87b6bc732fa9ff7b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_LPR_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267afa6659c124ebe18b68bebf56d1a99606</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Impress_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267adc43d7c842dca6214876b2335f7ebf7d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_RLP_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ab47d13b0b5f234c20b1fd8594e903054</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Hostname</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267acddef5f414494943a3dccf5f1c60b622</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Boot_File_Size</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1df26a2b2ba9a101b4722c07a95ad8b8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Merit_Dump_File</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a9485cc76a7f5a955f6c557e39949e936</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Domain_Name</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a5e722990c22229b122cc82ef9a6860f1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Swap_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aae77ca18e62d574a8ce3cb8b0c41306d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Root_Path</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a17c525c0f329ea844e2949047c9cf3c4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Extension_File</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ae53b005959bb221f8a987a12b229607e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Forward_On_Off</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a01a678dee4780da54ba84a927a226c2d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_SrcRte_On_Off</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a11c4aa754009c765dca9af0d38354d83</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Policy_Filter</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aa639ce27b22dd94f73230254fa5e614b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Max_DG_Assembly</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a6c8e408e641f168d0e16d6bf9f73a86b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Default_IP_TTL</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a172d60b4d8b665c640cc0e6d8d1ee4f1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_MTU_Timeout</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267afd57e8f5523a60577f9f28929a96b5af</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_MTU_Plateau</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a6da75f842ab197b0dce33099a6c8b9a9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_MTU_Interface</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267acc58dcea43623cb816a8d3aeb76b5ef1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_MTU_Subnet</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a7f0c5784c9c6c09beb001420c9dcd27b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Broadcast_Address</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1549b63a5d3d29b1bb1cc2edb244727b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Mask_Discovery</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac83c18e46a5eda9312734480a87052e1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Mask_Supplier</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ae664fa2f96f74afa2d4b06b630df3918</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Router_Discovery</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3c7e0a7996a56850372085eeb17cb05b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Router_Request</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267adfa5bf99208f509c29482af852e947e8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Static_Route</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a69ae5b7e45a10e01ec6ed2bfc3c5d432</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Trailers</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267af9afedc6aae1478dddf221cb50ff5e90</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_ARP_Timeout</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267af695b120918d3b6184496e4f8dfbd08d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Ethernet</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a6c4d8483ef2919f61d483ca148373fe2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Default_TCP_TTL</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a2e040e5f455dbf8f0e58ce211d008b2e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Keepalive_Time</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ab7c01bb939de46cebcf2fd59f4681c9a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Keepalive_Data</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a4848cd5b247e19a53e25b8b19f0cda79</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NIS_Domain</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a61b2484e865d87160c2fdc57f4d9cf26</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NIS_Servers</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3d38266d6255cc2758c7835c14dc4e64</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NTP_Servers</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a9f6393d845be5470b70541a8b0d61f6b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Vendor_Specific</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1a117c6bf7e8529e47f15b7bb98134c0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NETBIOS_Name_Srv</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a0a6dab62f4b3dbef55cd463baddcfbc1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NETBIOS_Dist_Srv</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aa32205b2ce09e43636610da33af3f67a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NETBIOS_Node_Type</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a7f147e4d047d2520d72d112a982051a9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NETBIOS_Scope</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac81ec528c4853567162a84d927201989</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_X_Window_Font</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1029f12f49c85b6632334bfa50c41470</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_X_Window_Manager</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac9f843f778dec2ea8c9a3448878de16a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Address_Request</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ad907c2d58a9105c09cadff20dd637cdf</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Address_Time</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ab6c1afaf4d45ffd3a7cba7a89a2b3842</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Overload</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1ae58715af5dc64d31636b52e8e1c9b6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_DHCP_Msg_Type</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aec311da2af406a328f277b0f2fb3a82f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_DHCP_Server_Id</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a55b2feac2916ca0359a166cd181f90b2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Parameter_List</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac8f3b4449ccfb57512bcf8512d8e6bc8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_DHCP_Error_Message</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a6087dafa9de89a09e86673cf911401ba</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_DHCP_Max_Msg_Size</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a8eec205b20430ae6ceb30e6c0f6f7821</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Renewal_Time</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a22bb26a2d3bb13080d4e60d36629de84</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Rebinding_Time</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac93fb941a9a459ac948a04bc7d7046ea</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Class_Id</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ab718f2a66a86656d0b7a0a0054debef4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Client_Id</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3a053d95af35d07fd6b89fa221ecb25f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NetWare_IP_Domain</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a9debdf18426621bd3fa7766a1232f92b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NetWare_IP_Option</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3869b8054427578ddeb921307152709b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NIS_Domain_Name</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac5052d4f68689bfb4ed19aa48a199031</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NIS_Server_Addr</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1bbc999cc35cdaa528f6917e232ced1e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Server_Name</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a12b8f8d1b8ef85c2b7ae1ceeccaaedf9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Bootfile_Name</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267abfdc7bfff9ec4ce7f31c70ebe998b954</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Home_Agent_Addrs</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a25976b54480f46182a27685193166544</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_SMTP_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a18acd1ebc079947540d8510028ade9c2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_POP3_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aea60603b068a1e9c3092935a46a35620</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NNTP_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aa39ab80643b0d53856642e7bcb08e851</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_WWW_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ad6e4eaae6c03142e9cf34c5dcce1c9b9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Finger_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a26997d21c22819aa026f17931526c3fc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_IRC_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ab4f06c56ebc8542ff036874462fa06cf</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_StreetTalk_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a2c2a9461ead25b638470d117f62c693c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_STDA_Server</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a90bb3aa3d636f453b814e62f6b01afa2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_User_Class</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac2d94d8867208f0b7dd7db0c8f4f0410</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Directory_Agent</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267addf51622995424216a5c9b093a09690d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Service_Scope</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a490bfcb5b1edc4d38e889445b2bae438</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Rapid_Commit</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a57eef60d953036aa71ca0f86f503277c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Client_FQDN</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ab71fc6aa6acd194b6168fd90d9416b79</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Relay_Agent_Information</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac9e7b477c65828c675aa983550f20708</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_iSNS</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267af3056722f57c9e2deb11b7ac89bc6aad</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NDS_Servers</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267af38d03ef84426035e4e98b0b150f67a4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NDS_Tree_Name</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a6d5e0fd3c4e10ee5ca759f580df85379</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_NDS_Context</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267adda2c9999a502bcbea1a2d939c83722a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_BCMCS_Controller_Domain_Name_list</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a309d59bc829f89e327d564ca83f9ea35</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_BCMCS_Controller_IPv4_address_option</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a26fb514ac58a40a4e929125ddf8444a0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Authentication</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aebc20bbbd856ecf20e83bcc686ce9d47</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_client_last_transaction_time</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a816b14a051325d9f932ff4716756f800</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_associated_ip</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a43d2e59cb8d933a8572342c8b6d866ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Client_System</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a37af94707d0f562976bfc6317c43bde2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Client_NDI</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267af147b15ea7029f0bbb947826e8b814a6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_LDAP</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267adaaf1df2b4fbef075fb785a8711dea01</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_REMOVED_Unassigned</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1fa630140e4d92299c63be6d10781105</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_UUID_GUID</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ad7588ad44a5224ae76b821b7c62bb07b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_User_Auth</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267acd1fe71d641ec7dfcdb33ed9f43e66da</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_GEOCONF_CIVIC</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a52bdfbace1a1b2934fc0811dcfa06f68</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_PCode</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a21d49fa0ae4548d7af0f95baa07ac017</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_TCode</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a10bc22328c68c3000cf8d7b1628818b6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Netinfo_Address</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a78bc5859b268bcc2d3545c8f5dfbae96</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Netinfo_Tag</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ae887e6c0a82fb5ec307065228c51c790</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a52bc7b00fd1d68b5dc04151c326e0818</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Auto_Config</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267adbacec91caecd4a7fbe7e101b9ab6d2c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Name_Service_Search</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a523555ccbf327ecff12b085ae5d7db3a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Subnet_Selection_Option</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a29bd9fe0badcd3468055ce6cdae92a24</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Domain_Search</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a80cba2bedb41e20701ae27ace44ad477</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_SIP_Servers_DHCP_Option</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a22345c46a4d62c70d3b1339e581a3731</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Classless_Static_Route_Option</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aa388f714c3767f8c9a86e48d7d525b4b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_CCC</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1ad3a007b2b9cbad13ba5a008b3ec0df</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_GeoConf_Option</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a906df978c0c2f24cb8f5336e1b914d23</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_V_I_Vendor_Class</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a8ad8e03ea332ead5aa48ce48bf2be268</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_V_I_Vendor_Specific_Information</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1a93a89cce7f5de694b59d18e970318e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Etherboot_signature</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a76811d968f0658217813a3f03f301821</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_DOCSIS</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a4ba4c7001da4ee3c95ce6c881fca4d91</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_TFTP_Server_IP</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a13bd9cc98ebc3ecc966ee435816795c3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Kernel_options</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a0cd77d0466916c4dc19d382d3b31640b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Call_Server_IP</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ae7888f655111c7372d59fb3b678173ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Ethernet_interface</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267abc32b875f56efbd40f3012886e274144</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Discrimination</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a38daa9f7725d36d4a2815f2f00653942</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Remote_statistics_server_IP</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a301449c7264ff3ebaf8ecd8ac0319acb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_IEEE_802_1Q_VLAN_ID</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a570b3c33b9673eae85a2c6606f554d4c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_IEEE_802_1D_p</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a69a488af2129f44b5bf4a857b2121c53</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_DSCP</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a6eba8281d22872a7399ef0a251dc45c1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_HTTP_Proxy</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a8a3dbcbf519c72394a53ae0f8a2550c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_OPTION_PANA_AGENT</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a7eda4742b715b5ea197c7b34437e90a6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_OPTION_V4_LOST</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a5619ebc89deebdb25f555edb9f9a9ad7</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_OPTION_CAPWAP_AC_V4</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3eb6db2d74930e5a1491566009ceb455</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_OPTION_IPv4_Address_MoS</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a86da375324b341191ef9d26b17c9b3f3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_OPTION_IPv4_FQDN_MoS</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a12103feb04edb440553a019d355acdd4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_TFTP_server_address</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267afa0c82213301d607a4d9a2c96f455637</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Etherboot</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac5a27f085ec2c7f16344780104ea594a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_GRUB_configuration_path_name</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac85874f026b1900e5b4d49c7b81b5324</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_IP_Telephone</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a3cc7dd46e6f5c867f73ffdd8b63075a8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_PacketCable_and_CableHome</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a7a523e971005cd539de416bf08f808e6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_PXELINUX_Magic</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a1be705d680c1dfb50a4028aa97b1a57d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Configuration_File</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267aab40cb17d9a5b3a08b606e2689b4c3c3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Path_Prefix</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267ac454853cf81c135e7ba5120dab807b8f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Reboot_Time</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a987d24bb1c47b0a2e1104e4a1eae40d2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Subnet_Allocation</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267af600259f2b6bf657860363d3ff54a36e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_Virtual_Subnet</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a9a5537489715198359224a72a8333f5a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_null</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a5248003e467b342ad8d367d77c03a102</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp_code_End</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ae8a9751325d4773a0a83f3b9acd1c267a57f24581049c7b6b50678bedf5d1e18b</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_init</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>aa86c774dfbc192fcf37731deac3009af</anchor>
- <arglist>(tnet_dhcp_option_t *self, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_deinit</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>aede9304d533f9fec7529149b345da1ae</anchor>
- <arglist>(tnet_dhcp_option_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_option_t *</type>
- <name>tnet_dhcp_option_deserialize</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a4f9f1042f27b33be6150ce5a7eea09f8</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_serialize</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a155a3fdeef17dc15f70dfe8ff41dddf7</anchor>
- <arglist>(const tnet_dhcp_option_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_serializeex</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a01c369b06ee3e99ed20ec3bcb7a1ce16</anchor>
- <arglist>(tnet_dhcp_option_code_t code, uint8_t length, const void *value, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_option_paramslist_add_code</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a08821769abef66cf1e459fb89ba442a2</anchor>
- <arglist>(tnet_dhcp_option_paramslist_t *self, tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_option_t *</type>
- <name>tnet_dhcp_option_create</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>ab9c6dfc8352393b8052b651930c1a417</anchor>
- <arglist>(tnet_dhcp_option_code_t code)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_option_paramslist_t *</type>
- <name>tnet_dhcp_option_paramslist_create</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a2b702a769d6ec8e978fbf96883f16702</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_option_dns_t *</type>
- <name>tnet_dhcp_option_dns_create</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a1b1f05e525002a7604ae09b3a93c4392</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_def_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a4375d338dbe4882ff1e4b6f50a5930c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_ns_def_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a848fe1ef765215af38d449d4b0fd5943</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_paramslist_def_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a4188002caa3f5d304c2fc8d05f12ff95</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_dns_def_t</name>
- <anchorfile>tnet__dhcp__option_8h.html</anchorfile>
- <anchor>a5fb79a339ebd4e5f8d3f4a660a1e1b5d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp_option_sip.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp__option__sip_8c</filename>
- <includes id="tnet__dhcp__option__sip_8h" name="tnet_dhcp_option_sip.h" local="yes" imported="no">tnet_dhcp_option_sip.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">dns/tnet_dns_rr.h</includes>
- <member kind="function">
- <type>tnet_dhcp_option_sip_t *</type>
- <name>tnet_dhcp_option_sip_create</name>
- <anchorfile>tnet__dhcp__option__sip_8c.html</anchorfile>
- <anchor>ae86d8d7fc2165ad48e3b0045d9a46741</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_sip_def_t</name>
- <anchorfile>tnet__dhcp__option__sip_8c.html</anchorfile>
- <anchor>a52f05e713d97bbab043093691ffb7b5c</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp_option_sip.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp/</path>
- <filename>tnet__dhcp__option__sip_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dhcp__option_8h" name="tnet_dhcp_option.h" local="yes" imported="no">tnet_dhcp_option.h</includes>
- <class kind="struct">tnet_dhcp_option_sip_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dhcp_option_sip_s</type>
- <name>tnet_dhcp_option_sip_t</name>
- <anchorfile>tnet__dhcp__option__sip_8h.html</anchorfile>
- <anchor>a39b62ac1f962ef42faaa1243c19d0700</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp_option_sip_t *</type>
- <name>tnet_dhcp_option_sip_create</name>
- <anchorfile>tnet__dhcp__option__sip_8h.html</anchorfile>
- <anchor>a987bc86af29c0bf1f00f6af77c6a9794</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp_option_sip_def_t</name>
- <anchorfile>tnet__dhcp__option__sip_8h.html</anchorfile>
- <anchor>a722bd3581d65a608a7eec06a40920992</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6_8c</filename>
- <includes id="tnet__dhcp6_8h" name="tnet_dhcp6.h" local="yes" imported="no">tnet_dhcp6.h</includes>
- <member kind="function">
- <type>tnet_dhcp6_ctx_t *</type>
- <name>tnet_dhcp6_ctx_create</name>
- <anchorfile>tnet__dhcp6_8c.html</anchorfile>
- <anchor>a65328f23502499947219f80b285349b0</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_reply_t *</type>
- <name>tnet_dhcp6_send_request</name>
- <anchorfile>group__tnet__dhcp6__group.html</anchorfile>
- <anchor>gadac4a203c542c67bcd608974944ade8d</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, tnet_dhcp6_request_t *request)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_reply_t *</type>
- <name>tnet_dhcp6_requestinfo</name>
- <anchorfile>group__tnet__dhcp6__group.html</anchorfile>
- <anchor>gac8dd99f4e54866bbdf190ce5061b5b3a</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, const tnet_dhcp6_option_orequest_t *orequest)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_ctx_def_t</name>
- <anchorfile>tnet__dhcp6_8c.html</anchorfile>
- <anchor>aedef4f922e3c639b6bcbf4625f347050</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dhcp6__message_8h" name="tnet_dhcp6_message.h" local="yes" imported="no">tnet_dhcp6_message.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <class kind="struct">tnet_dhcp6_ctx_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_VENDOR_CLASS_DATA_DEFAULT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a77a47e057fcd3feee6a6ea6ca67be5a3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_All_DHCP_Relay_Agents_and_Servers</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>aba226ab3184b0eeb37fd2cd175993af0</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_All_DHCP_Servers</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a3daf3c978170cc4d1c3efa71704bdffb</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_SOL_MAX_DELAY</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>ac7651259caa112f43790703a8d982957</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_SOL_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>acd358db10e5574bacf05dd459a80669a</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_SOL_MAX_RT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a8d86fe584a433bf33683590b92b472f5</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REQ_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>ac73b545aaf7be2d2508ef5c4a4dbbcba</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REQ_MAX_RT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a4e30fbce41200c6c8948f11108d945d5</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REQ_MAX_RC</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>ac63784bde12e796094e5c7c574cad858</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_CNF_MAX_DELAY</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a705366e8798017d5a91cf672ecd427cc</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_CNF_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a88918fd42ad5bdad2ee38c647eb9ab55</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_CNF_MAX_RT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a05b88aad73b2fdd90877a7d8b12c6e17</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_CNF_MAX_RD</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a0beba10b142e2504854d5e6b745d637c</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REN_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a9b642dc3551499424e4ccb5fd7de1a87</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REN_MAX_RT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>aad8e25c55996b4b539415572040509bb</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REB_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a62c4bbc046ae2586dc53c87dbad79354</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REB_MAX_RT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>ab5db7aad6ff064b544ce449f2041f2d3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_INF_MAX_DELAY</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>ab0c98c0588182dcc5659b6d2b6d60742</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_INF_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a2a5bc3707cd31848a9e8d17786b3b9b7</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_INF_MAX_RT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>afce91c3c151c45351e44fa6a84620321</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REL_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a51722f784ecd9892c789c5a68d230db5</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REL_MAX_RC</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a0269ce1104f8f96dbf7d28b70135c4fa</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_DEC_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a2bd1d5297f92edbdd1537df9fadd2d8a</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_DEC_MAX_RC</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>aa378cfd76fb91722de7c82dc149b9351</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REC_TIMEOUT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a2e5f4d83b55504ac3176a030530920bd</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_REC_MAX_RC</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>aef253c7ac2234bf2fd261a3713575d9b</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_RT_HOP_COUNT_LIMIT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>aa42aa205bd76ebe8eb41499de2fddc6c</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_TIMEVAL_INFINITY</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>abde3fc1a4d5a887fb742215832866018</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_CLIENT_PORT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a102edccd001f74ce44438d0b7836d4eb</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_SERVER_PORT</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a8088025204cff9dc319aa02f0e448a94</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_ctx_s</type>
- <name>tnet_dhcp6_ctx_t</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>aa5ef731f53320126a141fcf6e6ff244e</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_reply_t *</type>
- <name>tnet_dhcp6_requestinfo</name>
- <anchorfile>group__tnet__dhcp6__group.html</anchorfile>
- <anchor>gac8dd99f4e54866bbdf190ce5061b5b3a</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, const tnet_dhcp6_option_orequest_t *orequest)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_ctx_t *</type>
- <name>tnet_dhcp6_ctx_create</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a356d67baebf7f38649454a27dac20983</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_ctx_def_t</name>
- <anchorfile>tnet__dhcp6_8h.html</anchorfile>
- <anchor>a4b2db90770aebf579b3c4413ec5e0afd</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6_duid.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6__duid_8c</filename>
- <includes id="tnet__dhcp6__duid_8h" name="tnet_dhcp6_duid.h" local="yes" imported="no">tnet_dhcp6_duid.h</includes>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_llt_serialize</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a6158e8d5f12ebb59d063aaa2188b8c88</anchor>
- <arglist>(const tnet_dhcp6_duid_llt_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_en_serialize</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a49faf9f7df8f9bec56a7513d80760bbf</anchor>
- <arglist>(const tnet_dhcp6_duid_en_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_ll_serialize</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>ad3b89b93ceb86c6eefb69edb4c4e0468</anchor>
- <arglist>(const tnet_dhcp6_duid_ll_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_duid_llt_t *</type>
- <name>tnet_dhcp6_duid_llt_create</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>ad669e57db28c397394675192c5491045</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_duid_en_t *</type>
- <name>tnet_dhcp6_duid_en_create</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a9676e3d562b936c4527404cc2f7efff9</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_duid_ll_t *</type>
- <name>tnet_dhcp6_duid_ll_create</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>ab0782d8fce2411236be32df83653c626</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_init</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a77fedc7d6fdba85f14b495e79cbc49a2</anchor>
- <arglist>(tnet_dhcp6_duid_t *self, tnet_dhcp6_duid_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_deinit</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a300a2a4fd5176167fdb36690e56614a8</anchor>
- <arglist>(tnet_dhcp6_duid_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_duid_t *</type>
- <name>tnet_dhcp6_duid_deserialize</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a3199da6b9c0b69f3624797ca453b34a8</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_serialize</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a9e5ba71e2a4e5d7e97fe1a5638ff49d7</anchor>
- <arglist>(const tnet_dhcp6_duid_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_duid_llt_def_t</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a6272c96c0db70f87dfd83fa2830b1293</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_duid_en_def_t</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>a00e01ddd6f88a34736506ecf3e61cefe</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_duid_ll_def_t</name>
- <anchorfile>tnet__dhcp6__duid_8c.html</anchorfile>
- <anchor>adace29407e9d71220f2c226413e06f00</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6_duid.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6__duid_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__hardwares_8h" name="tnet_hardwares.h" local="yes" imported="no">tnet_hardwares.h</includes>
- <class kind="struct">tnet_dhcp6_duid_s</class>
- <class kind="struct">tnet_dhcp6_duid_llt_s</class>
- <class kind="struct">tnet_dhcp6_duid_en_s</class>
- <class kind="struct">tnet_dhcp6_duid_ll_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_DUID</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ab4c6f2cd628bd38f47a2b1ee40cbd0ea</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_DUID_LLT</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ae98050166aa26df3653f93a294a9f050</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_DUID_EN</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a414aa40eb67f6d0fd897d35558068d4c</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_DUID_LL</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a6dcc472aadbac1899c34516d268e2e53</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DECLARE_DHCP6_DUID</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>aecb22b4bb4e7cfa73066e7e24fa273bd</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dhcp6_duid_type_e</type>
- <name>tnet_dhcp6_duid_type_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a6ace50507f0d1ff6a3d11ad7a3abcc45</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_duid_s</type>
- <name>tnet_dhcp6_duid_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ac98eadf10c17c6e565659d1ca092ce2b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dhcp6_duids_L_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a2ad6d664409b477704d224683c27c637</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_duid_llt_s</type>
- <name>tnet_dhcp6_duid_llt_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a4588ecc95aef0ad9aef18c98f434e30a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_duid_en_s</type>
- <name>tnet_dhcp6_duid_en_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>aa2bd03ce3ce8d569d40613c1acfe2eb9</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_duid_ll_s</type>
- <name>tnet_dhcp6_duid_ll_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a1ea496b636bc7aad4c75421a88c07304</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp6_duid_type_e</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ae4487e952ac42c84e59514abd6b42fca</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_duid_linklayer_plus_time</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ae4487e952ac42c84e59514abd6b42fcaaf8d0386e94677b1e9ebddb38af60c0e3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_duid_Vendor_assigned_id</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ae4487e952ac42c84e59514abd6b42fcaab9178b2917c5cea836d2139dc30074c3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_duid_linklayer</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ae4487e952ac42c84e59514abd6b42fcaaad211ab6478327692901e93bad0ae975</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_init</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a77fedc7d6fdba85f14b495e79cbc49a2</anchor>
- <arglist>(tnet_dhcp6_duid_t *self, tnet_dhcp6_duid_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_deinit</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a300a2a4fd5176167fdb36690e56614a8</anchor>
- <arglist>(tnet_dhcp6_duid_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_duid_t *</type>
- <name>tnet_dhcp6_duid_deserialize</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a3199da6b9c0b69f3624797ca453b34a8</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_duid_serialize</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a9e5ba71e2a4e5d7e97fe1a5638ff49d7</anchor>
- <arglist>(const tnet_dhcp6_duid_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_duid_llt_t *</type>
- <name>tnet_dhcp6_duid_llt_create</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>af6415090eae08032278ca9bbc9cb05a6</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_duid_en_t *</type>
- <name>tnet_dhcp6_duid_en_create</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a6ffd8bf8ee46ce8ffc113d0ace87aaf1</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_duid_ll_t *</type>
- <name>tnet_dhcp6_duid_ll_create</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ae87a2c797c94c599aa338d7e9968a218</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_duid_llt_def_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ad547787afd9e2da4814a0d1521d4f0ed</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_duid_en_def_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>ab238a01b1746af439c0bb24454461929</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_duid_ll_def_t</name>
- <anchorfile>tnet__dhcp6__duid_8h.html</anchorfile>
- <anchor>a023c6eeebfc906ffc76746420d96dcf7</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6_message.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6__message_8c</filename>
- <includes id="tnet__dhcp6__message_8h" name="tnet_dhcp6_message.h" local="yes" imported="no">tnet_dhcp6_message.h</includes>
- <includes id="tnet__dhcp6_8h" name="tnet_dhcp6.h" local="yes" imported="no">tnet_dhcp6.h</includes>
- <member kind="function">
- <type>tnet_dhcp6_message_t *</type>
- <name>tnet_dhcp6_message_create</name>
- <anchorfile>tnet__dhcp6__message_8c.html</anchorfile>
- <anchor>a2fc793a413bfb883283381f34af6fbc6</anchor>
- <arglist>(tnet_dhcp6_message_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_request_t *</type>
- <name>tnet_dhcp6_request_create</name>
- <anchorfile>tnet__dhcp6__message_8c.html</anchorfile>
- <anchor>ae36dd840f14b603a475783ef25c76810</anchor>
- <arglist>(tnet_dhcp6_message_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dhcp6_message_serialize</name>
- <anchorfile>tnet__dhcp6__message_8c.html</anchorfile>
- <anchor>a9e395202fd1e6d0c6ba0c55682540c3d</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, const tnet_dhcp6_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_message_t *</type>
- <name>tnet_dhcp6_message_deserialize</name>
- <anchorfile>tnet__dhcp6__message_8c.html</anchorfile>
- <anchor>a49db33d334a348c07b63a482690ac5ec</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_message_def_t</name>
- <anchorfile>tnet__dhcp6__message_8c.html</anchorfile>
- <anchor>a11a2de3d84357d63c0f4908c458f975a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6_message.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6__message_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dhcp6__option_8h" name="tnet_dhcp6_option.h" local="yes" imported="no">tnet_dhcp6_option.h</includes>
- <class kind="struct">tnet_dhcp6_message_s</class>
- <member kind="typedef">
- <type>enum tnet_dhcp6_message_type_e</type>
- <name>tnet_dhcp6_message_type_t</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a0bcb6998750e054507a274a9e472d9a1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_message_s</type>
- <name>tnet_dhcp6_message_t</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a7760565583413b629d7a07a9e29b4127</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dhcp6_messages_L_t</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a0d743e984418aa468d03b72d71ad8feb</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dhcp6_message_t</type>
- <name>tnet_dhcp6_request_t</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>aa865622fe65b53de943c7a707bcae9bc</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dhcp6_message_t</type>
- <name>tnet_dhcp6_reply_t</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a45b3436dedd8df1cc9dbcc5926250860</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp6_message_type_e</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_solicit</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa752d897b810360fba91c3c8d8ec3312c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_advertise</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fafd50f635f56e1c6430c7a7d3a4b07747</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_request</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa8c4f308655ddd23c677ed36652c76cce</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_confirm</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa269988c1d51a8ba5aaec3a166baa1eba</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_renew</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa951d6681cdfed91bb96b57b17e9aeff7</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_rebind</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa969ca16f1829dd91323dc2fa5394736f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_reply</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051faeb4607fab695e013e71f0620586e3210</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_release</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa2d441ba472324c0bc30c2242491eac6d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_decline</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051faa761896a9e21e6973d0525e014198edf</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_reconfigure</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa935a038fee6b2fee577300c88540bdbe</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_information_request</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fa6ea39e333ea3009f149c5c5a5d0c9fc2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_relay_forw</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051fac719efc885894060c1c2981d88bcb43c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_type_relay_repl</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a08323bace5a61ab47ec9035230fd051facd0f656ce45fa652dbfe61b9e174eb68</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dhcp6_message_serialize</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a765adabb5c24a3202851887aede7b2a6</anchor>
- <arglist>(const struct tnet_dhcp6_ctx_s *ctx, const tnet_dhcp6_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_message_t *</type>
- <name>tnet_dhcp6_message_deserialize</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a4ce79b2c9ad5e947922a0dc8bf1a4b86</anchor>
- <arglist>(const struct tnet_dhcp6_ctx_s *ctx, const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_message_t *</type>
- <name>tnet_dhcp6_message_create</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>ad4f84b23d7525a65b49b4cf0959cb2e7</anchor>
- <arglist>(tnet_dhcp6_message_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_request_t *</type>
- <name>tnet_dhcp6_request_create</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a86e344131239a1abbc0a5b2020ba570c</anchor>
- <arglist>(tnet_dhcp6_message_type_t type)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_message_def_t</name>
- <anchorfile>tnet__dhcp6__message_8h.html</anchorfile>
- <anchor>a3a81bc718d8e4a5337b9323898674b65</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6_option.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6__option_8c</filename>
- <includes id="tnet__dhcp6__option_8h" name="tnet_dhcp6_option.h" local="yes" imported="no">tnet_dhcp6_option.h</includes>
- <member kind="function">
- <type>tnet_dhcp6_option_t *</type>
- <name>tnet_dhcp6_option_create</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a85748a874ec0bffb44e93bc8736b5d3e</anchor>
- <arglist>(tnet_dhcp6_option_code_t code, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_identifier_t *</type>
- <name>tnet_dhcp6_option_indentifer_create</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a40b898765178c4cd270f8e434a60e99c</anchor>
- <arglist>(tnet_dhcp6_option_code_t code, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_identifier_t *</type>
- <name>tnet_dhcp6_option_clientid_create</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a9580a04b7683486bed424ddabde6363a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_identifier_t *</type>
- <name>tnet_dhcp6_option_serverid_create</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>ac09403b11d38fa71d5e43e8764b8b3d0</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_orequest_t *</type>
- <name>tnet_dhcp6_option_orequest_create</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>aee59d1f340f3dcb41b5f2d26d3d4205f</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_orequest_t *</type>
- <name>tnet_dhcp6_option_orequest_create_null</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>ab0c5c5a2ebd3c1c52d37baf37b325125</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_vendorclass_t *</type>
- <name>tnet_dhcp6_option_vendorclass_create</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a5531acf377107cd2aa88ffd3870ba380</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_vendorclass_t *</type>
- <name>tnet_dhcp6_option_vendorclass_create_null</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>ad966bc23c12478675fc8f67345bc2398</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_t *</type>
- <name>tnet_dhcp6_option_deserialize</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a6deadd8ce3e250a9c2d0d5f9d2aa1417</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_option_serialize</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a616180ce101ac37af7279cd50f754176</anchor>
- <arglist>(const tnet_dhcp6_option_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_option_serializeex</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a1365ca6c4618af8148b33da50e5014ce</anchor>
- <arglist>(tnet_dhcp6_option_code_t code, uint8_t length, const void *value, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_option_orequest_add_code</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a78b0a34a3f71f481b62bef2e62a62ae2</anchor>
- <arglist>(tnet_dhcp6_option_orequest_t *self, uint16_t code)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_def_t</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a4d539d4293a5ffe07892de7e47446c0e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_identifier_def_t</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>ac27e5694e1acf4290f84bb4a3d6f9922</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_orequest_def_t</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a1d68df186f478624ee10190391fec0ea</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_vendorclass_def_t</name>
- <anchorfile>tnet__dhcp6__option_8c.html</anchorfile>
- <anchor>a58062e3e28be055815c209a17e73d277</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dhcp6_option.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dhcp6/</path>
- <filename>tnet__dhcp6__option_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dhcp6__duid_8h" name="tnet_dhcp6_duid.h" local="yes" imported="no">tnet_dhcp6_duid.h</includes>
- <class kind="struct">tnet_dhcp6_option_data_s</class>
- <class kind="struct">tnet_dhcp6_option_s</class>
- <class kind="struct">tnet_dhcp6_option_identifier_s</class>
- <class kind="struct">tnet_dhcp6_option_orequest_s</class>
- <class kind="struct">tnet_dhcp6_option_vendorclass_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP6_OPTION</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>aee20957dcd988b9eeb518c7dd5b29b0c</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DECLARE_DHCP6_OPTION_DATA</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>af4e4efa6aafda6f9655e1f107ebcff64</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DECLARE_DHCP6_OPTION</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a1ed5fab473cbbdae0872f7b01f7b1901</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dhcp6_option_code_e</type>
- <name>tnet_dhcp6_option_code_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a831211e647d27d29c4137a406e0aa754</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dhcp6_statuscode_e</type>
- <name>tnet_dhcp6_statuscode_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a8a4ebada9e439ad886c5749e74d059dc</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_option_data_s</type>
- <name>tnet_dhcp6_option_data_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a80e20b0d831003308feb3f8b0521639a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_option_s</type>
- <name>tnet_dhcp6_option_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>ae1d01310fe3e2833f086e881ce3f9def</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dhcp6_options_L_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>adda8965a7c025d246c08c179c4025166</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_option_identifier_s</type>
- <name>tnet_dhcp6_option_identifier_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>ae7b3e87849bdddd627541ac8b5cfa1d7</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dhcp6_option_identifier_t</type>
- <name>tnet_dhcp6_option_clientid_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>aee3178ccfb9a0b673049f4e810ff8533</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dhcp6_option_identifier_t</type>
- <name>tnet_dhcp6_option_serverid_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>ad07c128ed8dfd9a9f478cada29af691a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_option_orequest_s</type>
- <name>tnet_dhcp6_option_orequest_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a17908a94b442306f9ff55fbef7fc2007</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp6_option_vendorclass_s</type>
- <name>tnet_dhcp6_option_vendorclass_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>acbc7975ffa9445566f76460082c17c63</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp6_option_code_e</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_clientid</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a3327501be0a9487e75ac42ce86a36e67</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_serverid</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755adca89895d7bbd1fe8e20c28398075ab3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_ia_na</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755ad64dd81543ed891886c102099798c36a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_ia_ta</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755adf0877126eb37e961e0fc9d6e404c224</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_iaaddr</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755add94edfa6121b8778986194871b47ab0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_oro</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a45f7a09638657fb5acd4f3985d446551</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_preference</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a61ffa98b9e00f00c48788b1501ff3ea2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_elapsed_time</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755ab4c8310c86603be2e86b3aedf5b5101a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_relay_msg</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a5fd852298a96a6fe86e96dab116182c5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_auth</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755aca52feda034b487bfcc7b0d916ec52a9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_unicast</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a27798813cf5efbd66b3ae6930798ebcc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_status_code</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755af21f3fecb13fccab021ddf3b6935b27f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_rapid_commit</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755ad1d6fa5166fa0c40fdcc30a8cb702340</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_user_class</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a5d8ae4e5e4f262b7d11a913eaecd3c0c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_vendor_class</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755ac165ac987ca81ee5d869584fbcdadcf8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_vendor_opts</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a9e056b5604dfe319deb2e8cd58861afa</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_interface_id</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755ad0304c4f94eb24f4c16c84253c003ec6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_reconf_msg</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a7ed5183ce5d4957dcad4bba1e0fb0553</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_code_reconf_accept</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a18e26c5402e469dd0b563e74157755a7dd4ea51d8c318bce7fc7176e7372c2b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dhcp6_statuscode_e</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_statuscode_Success</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3aa5fe1bbfa18c93352d763406a6abee895</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_statuscode_UnspecFail</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3aa5211f6b0b6572ff6639fe19868d2a1a1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_statuscode_NoAddrsAvail</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3aab7aaf46c2c61305b063f2d95c0cdced0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_statuscode_NoBinding</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3aa82d74c3472d527e8fb7ee35d683c561c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_statuscode_NotOnLink</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3aaf150cd0a65b9dcf8b149df553c9829a2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>dhcp6_statuscode_UseMulticast</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6a1e604c89f4b34f7c0aa133c0d9ec3aa5f0a83e8f0700574bd962c5e67ed0ba0</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_option_t *</type>
- <name>tnet_dhcp6_option_deserialize</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a6deadd8ce3e250a9c2d0d5f9d2aa1417</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_option_serialize</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a616180ce101ac37af7279cd50f754176</anchor>
- <arglist>(const tnet_dhcp6_option_t *self, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp6_option_serializeex</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a1365ca6c4618af8148b33da50e5014ce</anchor>
- <arglist>(tnet_dhcp6_option_code_t code, uint8_t length, const void *value, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_dhcp6_option_orequest_add_code</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a254494dfc26351e8535871b753f8ef92</anchor>
- <arglist>(tnet_dhcp6_option_orequest_t *self, uint16_t code)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_t *</type>
- <name>tnet_dhcp6_option_create</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a9123e1057d08e16a258f31a7b946141d</anchor>
- <arglist>(tnet_dhcp6_option_code_t code, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_identifier_t *</type>
- <name>tnet_dhcp6_option_indentifer_create</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>adfef6b59485ca292c871e7099990a983</anchor>
- <arglist>(tnet_dhcp6_option_code_t code, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_identifier_t *</type>
- <name>tnet_dhcp6_option_clientid_create</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a41729803caa5cfed4cc32b628d12cea3</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_identifier_t *</type>
- <name>tnet_dhcp6_option_serverid_create</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a32baebeda950dddbcb7b097fa802610b</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_orequest_t *</type>
- <name>tnet_dhcp6_option_orequest_create</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>aa01c6f0e1dab917ad548e6b9ca24c5a3</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_orequest_t *</type>
- <name>tnet_dhcp6_option_orequest_create_null</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a226b391dadb710d3ad724d2dd9e01ff4</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_vendorclass_t *</type>
- <name>tnet_dhcp6_option_vendorclass_create</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>abc11e9ad6fde65adb466965e97519a49</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dhcp6_option_vendorclass_t *</type>
- <name>tnet_dhcp6_option_vendorclass_create_null</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a194c3360bfcc440c40876408aa66f827</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_def_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>aca4bbdf87981922b053808636c8c7dfc</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_identifier_def_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a01cef52de83efd6444c6b70f2ecb2e91</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_orequest_def_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a7b8899d2a304e8dd5295cb126123ebee</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dhcp6_option_vendorclass_def_t</name>
- <anchorfile>tnet__dhcp6__option_8h.html</anchorfile>
- <anchor>a8820aedacaef53f0e229fdc8fa0f37fb</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns_8c</filename>
- <includes id="tnet__dns_8h" name="tnet_dns.h" local="yes" imported="no">tnet_dns.h</includes>
- <includes id="tnet__dns__regexp_8h" name="tnet_dns_regexp.h" local="yes" imported="no">tnet_dns_regexp.h</includes>
- <includes id="tnet__dns__message_8h" name="tnet_dns_message.h" local="yes" imported="no">tnet_dns_message.h</includes>
- <includes id="tnet__dns__opt_8h" name="tnet_dns_opt.h" local="yes" imported="no">tnet_dns_opt.h</includes>
- <includes id="tnet__dns__srv_8h" name="tnet_dns_srv.h" local="yes" imported="no">tnet_dns_srv.h</includes>
- <includes id="tnet__dns__naptr_8h" name="tnet_dns_naptr.h" local="yes" imported="no">tnet_dns_naptr.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_cache_maintenance</name>
- <anchorfile>tnet__dns_8c.html</anchorfile>
- <anchor>a16c6661ccdbde58b205fa5c9366f0581</anchor>
- <arglist>(tnet_dns_ctx_t *ctx)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_cache_entry_add</name>
- <anchorfile>tnet__dns_8c.html</anchorfile>
- <anchor>a9ec0ba4b1b141c296cba22236a4fa179</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tnet_dns_response_t *response)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_dns_cache_entry_t *</type>
- <name>tnet_dns_cache_entry_get</name>
- <anchorfile>tnet__dns_8c.html</anchorfile>
- <anchor>a510ba4e4ee2029a62b548239bed72e5e</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_ctx_t *</type>
- <name>tnet_dns_ctx_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga080c974f8f6bdb3779bfae98956e9821</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_cache_entry_t *</type>
- <name>tnet_dns_cache_entry_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga130888ddea8e08e520a2ffd02278d90d</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tnet_dns_response_t *answer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_cache_clear</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga4908f53f564e46f39472e1dc825aa3ce</anchor>
- <arglist>(tnet_dns_ctx_t *ctx)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_resolve</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaaaee535d51058d67d9f170239de354b3</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_enum</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaf08d4dbbaf1025a17613bd553bf4db78</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *e164num, const char *domain)</arglist>
- </member>
- <member kind="function">
- <type>char *</type>
- <name>tnet_dns_enum_2</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga1aa07c721d9e2e7bac6eea9f44a515c8</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *service, const char *e164num, const char *domain)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_query_srv</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gab4b9b4f145decf0d2886c8a4ea25a313</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *service, char **hostname, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_query_naptr_srv</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga0c2c6cdb03f205b6ce16af9398d91730</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *domain, const char *service, char **hostname, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_add_server</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga9d617f0cf0f0dc70e4a3bca53ab23824</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *host)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_cache_entry_def_t</name>
- <anchorfile>tnet__dns_8c.html</anchorfile>
- <anchor>a3558b767074cab929ebb5ff83ea07e87</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_ctx_def_t</name>
- <anchorfile>tnet__dns_8c.html</anchorfile>
- <anchor>a9794de95cdab15b74749bba2f785f9d8</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__message_8h" name="tnet_dns_message.h" local="yes" imported="no">tnet_dns_message.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <class kind="struct">tnet_dns_cache_entry_s</class>
- <class kind="struct">tnet_dns_ctx_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_CACHE_TTL</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gad0036c81833a0d67783075346183f741</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga27019bac31c0cd87fcf5f1d440d44db2</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_DGRAM_SIZE_DEFAULT</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga3f0a0842a1099131e50c4ce1358a8d66</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_SERVER_PORT_DEFAULT</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga3687b2e64d73b85594bd93a79df252af</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dns_cache_entry_s</type>
- <name>tnet_dns_cache_entry_t</name>
- <anchorfile>tnet__dns_8h.html</anchorfile>
- <anchor>a0f0ec5cf80cda2b90ebbfb2ea91b8546</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dns_cache_entries_L_t</name>
- <anchorfile>tnet__dns_8h.html</anchorfile>
- <anchor>ac5807116c43b05393fa66ca5137ea76e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dns_cache_entries_L_t</type>
- <name>tnet_dns_cache_t</name>
- <anchorfile>tnet__dns_8h.html</anchorfile>
- <anchor>a5a93db2cfefb5ba985653fa2b22d330c</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dns_ctx_s</type>
- <name>tnet_dns_ctx_t</name>
- <anchorfile>tnet__dns_8h.html</anchorfile>
- <anchor>a4eda9ed5b03bf8b4886156c1f103a4ea</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_dns_cache_clear</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga4908f53f564e46f39472e1dc825aa3ce</anchor>
- <arglist>(tnet_dns_ctx_t *ctx)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dns_response_t *</type>
- <name>tnet_dns_resolve</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaaaee535d51058d67d9f170239de354b3</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dns_response_t *</type>
- <name>tnet_dns_enum</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaf08d4dbbaf1025a17613bd553bf4db78</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *e164num, const char *domain)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API char *</type>
- <name>tnet_dns_enum_2</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga1aa07c721d9e2e7bac6eea9f44a515c8</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *service, const char *e164num, const char *domain)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_dns_query_srv</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gab4b9b4f145decf0d2886c8a4ea25a313</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *service, char **hostname, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_dns_query_naptr_srv</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga0c2c6cdb03f205b6ce16af9398d91730</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *domain, const char *service, char **hostname, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_dns_add_server</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga9d617f0cf0f0dc70e4a3bca53ab23824</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *host)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dns_ctx_t *</type>
- <name>tnet_dns_ctx_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga080c974f8f6bdb3779bfae98956e9821</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_ctx_def_t</name>
- <anchorfile>tnet__dns_8h.html</anchorfile>
- <anchor>abbdfc081a1491c06e89261c44cd60d5f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_cache_entry_def_t</name>
- <anchorfile>tnet__dns_8h.html</anchorfile>
- <anchor>a4efb02fd4cb984ebac4138e560ee9905</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_a.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__a_8c</filename>
- <includes id="tnet__dns__a_8h" name="tnet_dns_a.h" local="yes" imported="no">tnet_dns_a.h</includes>
- <member kind="function">
- <type>tnet_dns_a_t *</type>
- <name>tnet_dns_a_create</name>
- <anchorfile>tnet__dns__a_8c.html</anchorfile>
- <anchor>a9defb7c8612dda2afe5c22a9d8af2cc2</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_a_def_t</name>
- <anchorfile>tnet__dns__a_8c.html</anchorfile>
- <anchor>ac8c60b42680e0c32a283b160f4a879ab</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_a.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__a_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_a_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_a_s</type>
- <name>tnet_dns_a_t</name>
- <anchorfile>tnet__dns__a_8h.html</anchorfile>
- <anchor>ab141c5a0e9b9d0cf3409eb8360ec73f2</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dns_a_t *</type>
- <name>tnet_dns_a_create</name>
- <anchorfile>tnet__dns__a_8h.html</anchorfile>
- <anchor>a127c4a7530752dd17159d6cce2ec933d</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_a_def_t</name>
- <anchorfile>tnet__dns__a_8h.html</anchorfile>
- <anchor>aba9a5fca5fea194ada56d10229863ccf</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_aaaa.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__aaaa_8c</filename>
- <includes id="tnet__dns__aaaa_8h" name="tnet_dns_aaaa.h" local="yes" imported="no">tnet_dns_aaaa.h</includes>
- <member kind="function">
- <type>tnet_dns_aaaa_t *</type>
- <name>tnet_dns_aaaa_create</name>
- <anchorfile>tnet__dns__aaaa_8c.html</anchorfile>
- <anchor>a9af77e5771ba53c408d586b064292f57</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_aaaa_def_t</name>
- <anchorfile>tnet__dns__aaaa_8c.html</anchorfile>
- <anchor>acb37a50064cef53a2492b240ffeb0451</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_aaaa.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__aaaa_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_aaaa_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_aaaa_s</type>
- <name>tnet_dns_aaaa_t</name>
- <anchorfile>tnet__dns__aaaa_8h.html</anchorfile>
- <anchor>af029948ea55fd7149a3690373f3fc8b2</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_aaaa_t *</type>
- <name>tnet_dns_aaaa_create</name>
- <anchorfile>tnet__dns__aaaa_8h.html</anchorfile>
- <anchor>a9af77e5771ba53c408d586b064292f57</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_aaaa_def_t</name>
- <anchorfile>tnet__dns__aaaa_8h.html</anchorfile>
- <anchor>a96c0dd56a4c355044d58f0d53ff4aee8</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_cname.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__cname_8c</filename>
- <includes id="tnet__dns__cname_8h" name="tnet_dns_cname.h" local="yes" imported="no">tnet_dns_cname.h</includes>
- <member kind="function">
- <type>tnet_dns_cname_t *</type>
- <name>tnet_dns_cname_create</name>
- <anchorfile>tnet__dns__cname_8c.html</anchorfile>
- <anchor>a5dcf5f68f15132d89bafa3a061a62626</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_cname_def_t</name>
- <anchorfile>tnet__dns__cname_8c.html</anchorfile>
- <anchor>a8c03019ed6c906c4ec3bea95751654be</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_cname.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__cname_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_cname_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_cname_s</type>
- <name>tnet_dns_cname_t</name>
- <anchorfile>tnet__dns__cname_8h.html</anchorfile>
- <anchor>a03c83c67bce0fe05e2417f0d4d94425c</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_cname_t *</type>
- <name>tnet_dns_cname_create</name>
- <anchorfile>tnet__dns__cname_8h.html</anchorfile>
- <anchor>a5dcf5f68f15132d89bafa3a061a62626</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_cname_def_t</name>
- <anchorfile>tnet__dns__cname_8h.html</anchorfile>
- <anchor>a7d6aea0757005c803e88b2fbb58b7ec6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_message.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__message_8c</filename>
- <includes id="tnet__dns__message_8h" name="tnet_dns_message.h" local="yes" imported="no">tnet_dns_message.h</includes>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga98138daa781d9c12a4ba43f3371d0895</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tsk_bool_t isquery)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_create_null</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga353b8a830ee67c2a2d2a6e810f081ea9</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_response_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaca11f63942b2ed04516a0d2323c75e7f</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_query_t *</type>
- <name>tnet_dns_query_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gac97c055c0a0a84882eb586feb22ef097</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dns_message_serialize</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga98f52e21a3d361e2a837993c31756871</anchor>
- <arglist>(const tnet_dns_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_deserialize</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga72d0a558aa990326e3724bd06260ac65</anchor>
- <arglist>(const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_message_def_t</name>
- <anchorfile>tnet__dns__message_8c.html</anchorfile>
- <anchor>a7b52fae969a8d3fdbcaf82892ad14803</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_message.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__message_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_message_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_MESSAGE_IS_RESPONSE</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga2a5cf37ea80a5c81714042074eac92bf</anchor>
- <arglist>(message)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_MESSAGE_IS_QUERY</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaf24bf109d5da866b600989d53c24f2aa</anchor>
- <arglist>(message)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_RESPONSE_IS_SUCCESS</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaefa196185f91151ec1b70542d73f230b</anchor>
- <arglist>(response)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_RESPONSE_IS_ERROR</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gab7b1d2b4373729da855fad1816ef9e81</anchor>
- <arglist>(response)</arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dns_rcode_e</type>
- <name>tnet_dns_rcode_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a10a2d61b100eaa8fa40121a04227746e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dns_opcode_e</type>
- <name>tnet_dns_opcode_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>ac70fc820dc3345398e3d71dec208a0ba</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dns_message_s</type>
- <name>tnet_dns_message_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>adfe20e6afb683c719dfa690aa0ae82ca</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dns_messages_L_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a70167cb0e8bc6f7df28b176d58616b65</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dns_message_t</type>
- <name>tnet_dns_query_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>aa5e144b50fc52b3cd87fd9cfe230cb79</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_dns_message_t</type>
- <name>tnet_dns_response_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a5c96624b434eaa634b5dde4dee92ff61</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dns_rcode_e</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>rcode_noerror</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fdafb49d1855d22e2a14b9164e83f21c4d8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>rcode_error_format</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fda9eed8ffe73f0b6ac420350008aee371d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>rcode_server_failure</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fda2a9b39e282a286f2200701c6a6f5e2e3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>rcode_error_name</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fda0a69068bb631f39be6036eff8d973530</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>rcode_notimplemented</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fda51b705ad2e1bc9a41fd7289e69fc0217</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>rcode_refused</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>a2d9be471d959638233c90adb121505fdaa19a2787f2f80124a9d8a26bdcec5f0f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dns_opcode_e</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>ae948f57e10a3e473e1f37d13d7e571da</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>opcode_query</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>ae948f57e10a3e473e1f37d13d7e571daaf16852803537cc6a78d86024593654ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>opcode_iquery</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>ae948f57e10a3e473e1f37d13d7e571daa1d4afedc5e0d6721a623d5420110d53a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>opcode_status</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>ae948f57e10a3e473e1f37d13d7e571daab0ef3fad224dc5971f97e02b2fb8b714</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dns_message_serialize</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga98f52e21a3d361e2a837993c31756871</anchor>
- <arglist>(const tnet_dns_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_deserialize</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga72d0a558aa990326e3724bd06260ac65</anchor>
- <arglist>(const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga98138daa781d9c12a4ba43f3371d0895</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tsk_bool_t isquery)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_create_null</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga353b8a830ee67c2a2d2a6e810f081ea9</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_response_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaca11f63942b2ed04516a0d2323c75e7f</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_query_t *</type>
- <name>tnet_dns_query_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gac97c055c0a0a84882eb586feb22ef097</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_message_def_t</name>
- <anchorfile>tnet__dns__message_8h.html</anchorfile>
- <anchor>afa9682338ba81c46be181f6e7a63d53d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_mx.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__mx_8c</filename>
- <includes id="tnet__dns__mx_8h" name="tnet_dns_mx.h" local="yes" imported="no">tnet_dns_mx.h</includes>
- <member kind="function">
- <type>tnet_dns_mx_t *</type>
- <name>tnet_dns_mx_create</name>
- <anchorfile>tnet__dns__mx_8c.html</anchorfile>
- <anchor>a016b5719ecb6b707228b4350281ecee2</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_mx_def_t</name>
- <anchorfile>tnet__dns__mx_8c.html</anchorfile>
- <anchor>a005d5f47204c5bb134f6b0fa5b1a1ced</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_mx.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__mx_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_mx_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_mx_s</type>
- <name>tnet_dns_mx_t</name>
- <anchorfile>tnet__dns__mx_8h.html</anchorfile>
- <anchor>a612a857249dd90d7bb72d186b534fd7f</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_mx_t *</type>
- <name>tnet_dns_mx_create</name>
- <anchorfile>tnet__dns__mx_8h.html</anchorfile>
- <anchor>a016b5719ecb6b707228b4350281ecee2</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_mx_def_t</name>
- <anchorfile>tnet__dns__mx_8h.html</anchorfile>
- <anchor>aa421813d4ec3a8eed3f247fef75ddfe9</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_naptr.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__naptr_8c</filename>
- <includes id="tnet__dns__naptr_8h" name="tnet_dns_naptr.h" local="yes" imported="no">tnet_dns_naptr.h</includes>
- <includes id="tnet__endianness_8h" name="tnet_endianness.h" local="yes" imported="no">./tnet_endianness.h</includes>
- <member kind="function">
- <type>tnet_dns_naptr_t *</type>
- <name>tnet_dns_naptr_create</name>
- <anchorfile>tnet__dns__naptr_8c.html</anchorfile>
- <anchor>a8903290f814d88d1b685e3401591e8c3</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_naptr_def_t</name>
- <anchorfile>tnet__dns__naptr_8c.html</anchorfile>
- <anchor>aad6c6ba633c90e84931baa0af523a42d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_naptr.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__naptr_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_naptr_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_naptr_s</type>
- <name>tnet_dns_naptr_t</name>
- <anchorfile>tnet__dns__naptr_8h.html</anchorfile>
- <anchor>a40135eba84ad5108ead55d1198e9df63</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dns_naptr_t *</type>
- <name>tnet_dns_naptr_create</name>
- <anchorfile>tnet__dns__naptr_8h.html</anchorfile>
- <anchor>aa59f7ef27b64bf1340e75bfa3b8ded0d</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_naptr_def_t</name>
- <anchorfile>tnet__dns__naptr_8h.html</anchorfile>
- <anchor>a0f60311c1ef28f1999ecba475352922f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_ns.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__ns_8c</filename>
- <includes id="tnet__dns__ns_8h" name="tnet_dns_ns.h" local="yes" imported="no">tnet_dns_ns.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <member kind="function">
- <type>tnet_dns_ns_t *</type>
- <name>tnet_dns_ns_create</name>
- <anchorfile>tnet__dns__ns_8c.html</anchorfile>
- <anchor>a1f6a6ec6af069ac55d709f6313ea0f89</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_ns_def_t</name>
- <anchorfile>tnet__dns__ns_8c.html</anchorfile>
- <anchor>a30c52ab96205e922203a9cb983b1814c</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_ns.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__ns_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_ns_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_ns_s</type>
- <name>tnet_dns_ns_t</name>
- <anchorfile>tnet__dns__ns_8h.html</anchorfile>
- <anchor>a20afc97fb196ce2a3b1a4eb94603891f</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_dns_ns_t *</type>
- <name>tnet_dns_ns_create</name>
- <anchorfile>tnet__dns__ns_8h.html</anchorfile>
- <anchor>a32c62e90da38fed47351cd1ecdfe7323</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_ns_def_t</name>
- <anchorfile>tnet__dns__ns_8h.html</anchorfile>
- <anchor>a848fe1ef765215af38d449d4b0fd5943</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_opt.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__opt_8c</filename>
- <includes id="tnet__dns__opt_8h" name="tnet_dns_opt.h" local="yes" imported="no">tnet_dns_opt.h</includes>
- <member kind="function">
- <type>tnet_dns_opt_t *</type>
- <name>tnet_dns_opt_create</name>
- <anchorfile>tnet__dns__opt_8c.html</anchorfile>
- <anchor>a42d82b4cfecece6f35d08124861cd624</anchor>
- <arglist>(tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_opt_def_t</name>
- <anchorfile>tnet__dns__opt_8c.html</anchorfile>
- <anchor>ac54263af0e117f7ddd77eeb5bb77add3</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_opt.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__opt_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_opt_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_opt_s</type>
- <name>tnet_dns_opt_t</name>
- <anchorfile>tnet__dns__opt_8h.html</anchorfile>
- <anchor>aad1e4934eb5b8f462bf2fd70d3557d0b</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_opt_t *</type>
- <name>tnet_dns_opt_create</name>
- <anchorfile>tnet__dns__opt_8h.html</anchorfile>
- <anchor>a42d82b4cfecece6f35d08124861cd624</anchor>
- <arglist>(tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_opt_def_t</name>
- <anchorfile>tnet__dns__opt_8h.html</anchorfile>
- <anchor>a87bc155048ab772c6e275779c7a903fe</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_ptr.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__ptr_8c</filename>
- <includes id="tnet__dns__ptr_8h" name="tnet_dns_ptr.h" local="yes" imported="no">tnet_dns_ptr.h</includes>
- <member kind="function">
- <type>tnet_dns_ptr_t *</type>
- <name>tnet_dns_ptr_create</name>
- <anchorfile>tnet__dns__ptr_8c.html</anchorfile>
- <anchor>a0781972d80ae72b2836b931106dc922b</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_ptr_def_t</name>
- <anchorfile>tnet__dns__ptr_8c.html</anchorfile>
- <anchor>a322649cfc864a32b9a169f89a4d88ece</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_ptr.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__ptr_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_ptr_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_ptr_s</type>
- <name>tnet_dns_ptr_t</name>
- <anchorfile>tnet__dns__ptr_8h.html</anchorfile>
- <anchor>a36877f2a0e53fa1227a87f776d5ed6c5</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_ptr_t *</type>
- <name>tnet_dns_ptr_create</name>
- <anchorfile>tnet__dns__ptr_8h.html</anchorfile>
- <anchor>a0781972d80ae72b2836b931106dc922b</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_ptr_def_t</name>
- <anchorfile>tnet__dns__ptr_8h.html</anchorfile>
- <anchor>a7645989139aeb9e6c24c0c8995536ed5</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_regexp.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__regexp_8c</filename>
- <includes id="tnet__dns__regexp_8h" name="tnet_dns_regexp.h" local="yes" imported="no">tnet_dns_regexp.h</includes>
- <member kind="function">
- <type>char *</type>
- <name>tnet_dns_regex_parse</name>
- <anchorfile>tnet__dns__regexp_8c.html</anchorfile>
- <anchor>a9ed1816bfa7833863cf0743db5f26830</anchor>
- <arglist>(const char *e164num, const char *regexp)</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_regexp.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__regexp_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <member kind="function">
- <type>TNET_BEGIN_DECLS TINYNET_API char *</type>
- <name>tnet_dns_regex_parse</name>
- <anchorfile>tnet__dns__regexp_8h.html</anchorfile>
- <anchor>ad9b4290eea6c5833a15079a9ba6315b5</anchor>
- <arglist>(const char *e164num, const char *regexp)</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_resolvconf.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__resolvconf_8c</filename>
- <includes id="tnet__dns__resolvconf_8h" name="tnet_dns_resolvconf.h" local="yes" imported="no">tnet_dns_resolvconf.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <includes id="tnet__dns_8h" name="tnet_dns.h" local="yes" imported="no">dns/tnet_dns.h</includes>
- <member kind="function">
- <type>tnet_addresses_L_t *</type>
- <name>tnet_dns_resolvconf_parse</name>
- <anchorfile>tnet__dns__resolvconf_8c.html</anchorfile>
- <anchor>a450c767da8f966731be469a146759494</anchor>
- <arglist>(const char *path)</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_resolvconf.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__resolvconf_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <member kind="function">
- <type>TNET_BEGIN_DECLS TINYNET_API tnet_addresses_L_t *</type>
- <name>tnet_dns_resolvconf_parse</name>
- <anchorfile>tnet__dns__resolvconf_8h.html</anchorfile>
- <anchor>a7c7f9edfb32f7b57b9332973d1b7b217</anchor>
- <arglist>(const char *path)</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_rr.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__rr_8c</filename>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <includes id="tnet__dns__a_8h" name="tnet_dns_a.h" local="yes" imported="no">tnet_dns_a.h</includes>
- <includes id="tnet__dns__aaaa_8h" name="tnet_dns_aaaa.h" local="yes" imported="no">tnet_dns_aaaa.h</includes>
- <includes id="tnet__dns__cname_8h" name="tnet_dns_cname.h" local="yes" imported="no">tnet_dns_cname.h</includes>
- <includes id="tnet__dns__mx_8h" name="tnet_dns_mx.h" local="yes" imported="no">tnet_dns_mx.h</includes>
- <includes id="tnet__dns__naptr_8h" name="tnet_dns_naptr.h" local="yes" imported="no">tnet_dns_naptr.h</includes>
- <includes id="tnet__dns__ns_8h" name="tnet_dns_ns.h" local="yes" imported="no">tnet_dns_ns.h</includes>
- <includes id="tnet__dns__opt_8h" name="tnet_dns_opt.h" local="yes" imported="no">tnet_dns_opt.h</includes>
- <includes id="tnet__dns__ptr_8h" name="tnet_dns_ptr.h" local="yes" imported="no">tnet_dns_ptr.h</includes>
- <includes id="tnet__dns__soa_8h" name="tnet_dns_soa.h" local="yes" imported="no">tnet_dns_soa.h</includes>
- <includes id="tnet__dns__srv_8h" name="tnet_dns_srv.h" local="yes" imported="no">tnet_dns_srv.h</includes>
- <includes id="tnet__dns__txt_8h" name="tnet_dns_txt.h" local="yes" imported="no">tnet_dns_txt.h</includes>
- <member kind="function">
- <type>tnet_dns_rr_t *</type>
- <name>tnet_dns_rr_create</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>ac2a4807ec467a0c0d68a72cdcf2809c5</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_init</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>abbf82aaca6c13787652a732688b951f0</anchor>
- <arglist>(tnet_dns_rr_t *rr, tnet_dns_qtype_t qtype, tnet_dns_qclass_t qclass)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_deinit</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>a96fbca3132c00d7f47d17a20eaf3384b</anchor>
- <arglist>(tnet_dns_rr_t *rr)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_charstring_deserialize</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>a120e1c355fecace1874329b58d700d4d</anchor>
- <arglist>(const void *data, char **charstring, tsk_size_t *offset)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_qname_deserialize</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>a1ade7e249886b86b6fb68dd6ee807d60</anchor>
- <arglist>(const void *data, char **name, tsk_size_t *offset)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_qname_serialize</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>aacf6eb1f4fc48c1b662c704ea0e6bb5a</anchor>
- <arglist>(const char *qname, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_rr_t *</type>
- <name>tnet_dns_rr_deserialize</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>a6132fbb1895bc96764e773a0cbe8137f</anchor>
- <arglist>(const void *data, tsk_size_t size, tsk_size_t *offset)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_serialize</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>ad79d614d7a6e9cf9d9f69b381874cca1</anchor>
- <arglist>(const tnet_dns_rr_t *rr, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_rr_def_t</name>
- <anchorfile>tnet__dns__rr_8c.html</anchorfile>
- <anchor>a1c8c9b8399afa3a95932cea38da3b855</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_rr.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__rr_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <class kind="struct">tnet_dns_rr_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_RR</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>aa1292467e3d3978fd7ac6c7b10f87cc2</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a5cccd210b99ecceb030738248f17b76a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dns_qtype_e</type>
- <name>tnet_dns_qtype_t</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a62961afef3b1d8a3ce06b52a8a73db1d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_dns_qclass_e</type>
- <name>tnet_dns_qclass_t</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a69f1e6e11e7ef63d49fd0911e5ac3357</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dns_rr_s</type>
- <name>tnet_dns_rr_t</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>ace26a1f5215afe27b8d0a16460ef1beb</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_dns_rrs_L_t</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a92294f9508f61a03b7b5191acfa35f20</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dns_qtype_e</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_a</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea6b82b9692226f36f5553fd6d9780f9d5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_ns</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea2c626ab43259347ad612a7230b478e9d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_md</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea99c0993087c8dbbc55e4b6afdc4e4c8b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_mf</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea36ce8cf8155642e552675d2fc25eae44</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_cname</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea45425b4d0e6bd387ecb36c90ae99d370</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_soa</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeab40d6242e1e9586362fbd35086b64006</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_mb</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeaa11cd279e87a961352188184c2f2d8d2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_mg</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeaae9f1f64f391b7b455272f6cbde3ef8b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_mr</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeab75b84867779598974a29609294ca0bb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_null</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea86f36a2d858188aed1c34b67fe62ffd6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_wks</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea4059a57c201d0101a37c4d3f9eabf31a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_ptr</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeaed5edacf992f416dadc864f78c133459</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_hinfo</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea57b532f99f7b8333d46d1852336850d6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_minfo</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeabea007dc92b66ce9be0d1c1d269e78f2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_mx</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea54ce802cf2003da33264c8e03812dfc9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_txt</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeabc2ed8cc5ac7785b1494fc4d2cea915b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_aaaa</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea9352d81362b3407179adef085bdbce97</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_srv</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea00a47d3105646a15138910bbb4a2ea94</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_naptr</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea05b83408990091d7a963bfa4ed6651f5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_opt</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea8d2334865c3df5ee1ba23b9ca3a112d1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_ipseckey</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea252b893a0977eb9e3bd102654a71d825</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_spf</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aeac027ceb8ae33fe01d79b9b9e09f869cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qtype_any</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6d7667bb60a37e3cac21f13a0d2af6aea1a5b9dd4a833ad763b9bafc88a5cea5c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_dns_qclass_e</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a39c6ee8ca1d8f814024a17cfc3a88b5c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qclass_in</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a39c6ee8ca1d8f814024a17cfc3a88b5caa8fb176df6c5bdca6b7f088a84fd0384</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qclass_ics</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a39c6ee8ca1d8f814024a17cfc3a88b5ca3fa1f9f5dd15959e92668ddcec709850</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qclass_ch</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a39c6ee8ca1d8f814024a17cfc3a88b5ca8503dc4ab6ee9b2293740abb26631d4a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qclass_hs</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a39c6ee8ca1d8f814024a17cfc3a88b5cab00871fa3fb8dccd9c3b5e4eed53bbe2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>qclass_any</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a39c6ee8ca1d8f814024a17cfc3a88b5cac9a4560ad311dfe6ee260f6578f35e73</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_init</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>abbf82aaca6c13787652a732688b951f0</anchor>
- <arglist>(tnet_dns_rr_t *rr, tnet_dns_qtype_t qtype, tnet_dns_qclass_t qclass)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_deinit</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a96fbca3132c00d7f47d17a20eaf3384b</anchor>
- <arglist>(tnet_dns_rr_t *rr)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_charstring_deserialize</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6ec4f0742d53673299905dbcf2285af0</anchor>
- <arglist>(const void *data, char **name, tsk_size_t *offset)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_qname_deserialize</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a1ade7e249886b86b6fb68dd6ee807d60</anchor>
- <arglist>(const void *data, char **name, tsk_size_t *offset)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_qname_serialize</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>aacf6eb1f4fc48c1b662c704ea0e6bb5a</anchor>
- <arglist>(const char *qname, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_rr_t *</type>
- <name>tnet_dns_rr_deserialize</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a6132fbb1895bc96764e773a0cbe8137f</anchor>
- <arglist>(const void *data, tsk_size_t size, tsk_size_t *offset)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_rr_serialize</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>ad79d614d7a6e9cf9d9f69b381874cca1</anchor>
- <arglist>(const tnet_dns_rr_t *rr, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_rr_def_t</name>
- <anchorfile>tnet__dns__rr_8h.html</anchorfile>
- <anchor>a15a335d6e37b391bfdfe754266ff7ee2</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_soa.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__soa_8c</filename>
- <includes id="tnet__dns__soa_8h" name="tnet_dns_soa.h" local="yes" imported="no">tnet_dns_soa.h</includes>
- <member kind="function">
- <type>tnet_dns_soa_t *</type>
- <name>tnet_dns_soa_create</name>
- <anchorfile>tnet__dns__soa_8c.html</anchorfile>
- <anchor>a554c9fb10b89674333c4358d9b22971f</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_soa_def_t</name>
- <anchorfile>tnet__dns__soa_8c.html</anchorfile>
- <anchor>a26a935ec9f0f1ee97cebff4c2bcd1d30</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_soa.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__soa_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_soa_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_soa_s</type>
- <name>tnet_dns_soa_t</name>
- <anchorfile>tnet__dns__soa_8h.html</anchorfile>
- <anchor>a47c38512228462f2a7a2af3fdbbe5ee0</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_soa_t *</type>
- <name>tnet_dns_soa_create</name>
- <anchorfile>tnet__dns__soa_8h.html</anchorfile>
- <anchor>a554c9fb10b89674333c4358d9b22971f</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_soa_def_t</name>
- <anchorfile>tnet__dns__soa_8h.html</anchorfile>
- <anchor>a3ee61ed56ac01b434cb2ee7cbe7a3e47</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_srv.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__srv_8c</filename>
- <includes id="tnet__dns__srv_8h" name="tnet_dns_srv.h" local="yes" imported="no">tnet_dns_srv.h</includes>
- <member kind="function">
- <type>tnet_dns_srv_t *</type>
- <name>tnet_dns_srv_create</name>
- <anchorfile>tnet__dns__srv_8c.html</anchorfile>
- <anchor>a0989e7656444afa8eccb494162c1a840</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_srv_def_t</name>
- <anchorfile>tnet__dns__srv_8c.html</anchorfile>
- <anchor>a446d9cf2ccb2fb1d5f3534c9bdabf047</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_srv.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__srv_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_srv_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_srv_s</type>
- <name>tnet_dns_srv_t</name>
- <anchorfile>tnet__dns__srv_8h.html</anchorfile>
- <anchor>a4ebe2b222b25e6f185628a01bd80088f</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_srv_t *</type>
- <name>tnet_dns_srv_create</name>
- <anchorfile>tnet__dns__srv_8h.html</anchorfile>
- <anchor>a0989e7656444afa8eccb494162c1a840</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_srv_def_t</name>
- <anchorfile>tnet__dns__srv_8h.html</anchorfile>
- <anchor>a9ba8975bee55d2728c8902f752f5a064</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_txt.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__txt_8c</filename>
- <includes id="tnet__dns__txt_8h" name="tnet_dns_txt.h" local="yes" imported="no">tnet_dns_txt.h</includes>
- <member kind="function">
- <type>tnet_dns_txt_t *</type>
- <name>tnet_dns_txt_create</name>
- <anchorfile>tnet__dns__txt_8c.html</anchorfile>
- <anchor>aae4a21dd9f1ea22c7f2f171dc63d501b</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_dns_txt_def_t</name>
- <anchorfile>tnet__dns__txt_8c.html</anchorfile>
- <anchor>ae11da0ea12bd1bd4de45bace4264cf81</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_dns_txt.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/dns/</path>
- <filename>tnet__dns__txt_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__dns__rr_8h" name="tnet_dns_rr.h" local="yes" imported="no">tnet_dns_rr.h</includes>
- <class kind="struct">tnet_dns_txt_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_dns_txt_s</type>
- <name>tnet_dns_txt_t</name>
- <anchorfile>tnet__dns__txt_8h.html</anchorfile>
- <anchor>ab03bd98bda63e6584c344f0fb68dd50a</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_txt_t *</type>
- <name>tnet_dns_txt_create</name>
- <anchorfile>tnet__dns__txt_8h.html</anchorfile>
- <anchor>aae4a21dd9f1ea22c7f2f171dc63d501b</anchor>
- <arglist>(const char *name, tnet_dns_qclass_t qclass, uint32_t ttl, uint16_t rdlength, const void *data, tsk_size_t offset)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_dns_txt_def_t</name>
- <anchorfile>tnet__dns__txt_8h.html</anchorfile>
- <anchor>a7e04769891a173ae81dded18394e3992</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_ice.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/ice/</path>
- <filename>tnet__ice_8c</filename>
- <includes id="tnet__ice_8h" name="tnet_ice.h" local="yes" imported="no">tnet_ice.h</includes>
- </compound>
- <compound kind="file">
- <name>tnet_ice.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/ice/</path>
- <filename>tnet__ice_8h</filename>
- </compound>
- <compound kind="file">
- <name>tnet_stun.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/stun/</path>
- <filename>tnet__stun_8c</filename>
- <includes id="tnet__stun_8h" name="tnet_stun.h" local="yes" imported="no">tnet_stun.h</includes>
- <includes id="tnet__nat_8h" name="tnet_nat.h" local="yes" imported="no">../tnet_nat.h</includes>
- <member kind="function">
- <type>tnet_stun_binding_t *</type>
- <name>tnet_stun_binding_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga60801a4caec4d4335f0b4fea0e63025e</anchor>
- <arglist>(tnet_fd_t fd, tnet_socket_type_t socket_type, const char *server_address, tnet_port_t server_port, const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_create_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga481bcd3d5bfdfda6561227bfcf1fc359</anchor>
- <arglist>(const tnet_stun_binding_t *binding)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_send_reliably</name>
- <anchorfile>tnet__stun_8c.html</anchorfile>
- <anchor>a237dcc868a064df02b762deab4137f3f</anchor>
- <arglist>(const tnet_stun_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_response_t *</type>
- <name>tnet_stun_send_unreliably</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga36147911b3c99cbf897930c971608a5f</anchor>
- <arglist>(tnet_fd_t localFD, uint16_t RTO, uint16_t Rc, const tnet_stun_message_t *message, struct sockaddr *server)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_send_bind</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8151700d692ca34abf3cd42982723aa7</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_stun_binding_t *binding)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_binding_id_t</type>
- <name>tnet_stun_bind</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gafad0d44c67c44e0cf91de149a32e8079</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_transacid_cmp</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gad2cd556a7d81575118646c3e3002af66</anchor>
- <arglist>(const tnet_stun_transacid_t id1, const tnet_stun_transacid_t id2)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_binding_def_t</name>
- <anchorfile>tnet__stun_8c.html</anchorfile>
- <anchor>a0dd86286d48f57fdd7107fd84788f79a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_stun.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/stun/</path>
- <filename>tnet__stun_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__stun__message_8h" name="tnet_stun_message.h" local="yes" imported="no">stun/tnet_stun_message.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <class kind="struct">tnet_stun_binding_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_INVALID_BINDING_ID</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeb338f5c8a9b3ac08bba78293fdc22d4</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_IS_VALID_BINDING_ID</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga809cd1386eaa84094e78ef17a414ad7d</anchor>
- <arglist>(id)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_TCP_UDP_DEFAULT_PORT</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga840d6af2bf3bd3a96d120c942abefd7a</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_TLS_DEFAULT_PORT</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab0ae6bc64ad691f9bc5bd2b4c88c4569</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_MAGIC_COOKIE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gac5e54e4b4576b54b53d2f4242f3e30de</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_HEADER_SIZE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga1df2b74747811b1bbdad28b18e0d80c3</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_binding_s</type>
- <name>tnet_stun_binding_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabb378355a46b1aef733acdeef3a38368</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_stun_bindings_L_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga994b6db4d6ac6e78c4ece450f1d5edff</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_send_reliably</name>
- <anchorfile>tnet__stun_8h.html</anchorfile>
- <anchor>a237dcc868a064df02b762deab4137f3f</anchor>
- <arglist>(const tnet_stun_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_response_t *</type>
- <name>tnet_stun_send_unreliably</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga36147911b3c99cbf897930c971608a5f</anchor>
- <arglist>(tnet_fd_t localFD, uint16_t RTO, uint16_t Rc, const tnet_stun_message_t *message, struct sockaddr *server)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_stun_binding_id_t</type>
- <name>tnet_stun_bind</name>
- <anchorfile>tnet__stun_8h.html</anchorfile>
- <anchor>af34e4d8f55deb66b7ff5414552a7e9e6</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_transacid_cmp</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gad2cd556a7d81575118646c3e3002af66</anchor>
- <arglist>(const tnet_stun_transacid_t id1, const tnet_stun_transacid_t id2)</arglist>
- </member>
- <member kind="variable">
- <type>TNET_BEGIN_DECLS typedef uint64_t</type>
- <name>tnet_stun_binding_id_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab95871f186b8bf46b4630ab2ebb146aa</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_binding_def_t</name>
- <anchorfile>tnet__stun_8h.html</anchorfile>
- <anchor>acaa4cac3d3d802dd9090d36d6a7dd465</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_stun_attribute.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/stun/</path>
- <filename>tnet__stun__attribute_8c</filename>
- <includes id="tnet__stun__attribute_8h" name="tnet_stun_attribute.h" local="yes" imported="no">tnet_stun_attribute.h</includes>
- <includes id="tnet__stun_8h" name="tnet_stun.h" local="yes" imported="no">tnet_stun.h</includes>
- <includes id="tnet__turn__attribute_8h" name="tnet_turn_attribute.h" local="yes" imported="no">../turn/tnet_turn_attribute.h</includes>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_stun_attribute_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga9a8fea6f7fb4c6236bc4df85153d6af4</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_mapped_addr_t *</type>
- <name>tnet_stun_attribute_mapped_address_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga28ffe32f830bbe0f5b32a207538eb8b6</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_xmapped_addr_t *</type>
- <name>tnet_stun_attribute_xmapped_address_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gacd4af1df8c9e298a23d34df27e5dcc45</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_username_t *</type>
- <name>tnet_stun_attribute_username_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab92c8f62b2d188c9ac1528aa03da4b7e</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_integrity_t *</type>
- <name>tnet_stun_attribute_integrity_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3c5f79313850ea8643132b093e11ef6a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_fingerprint_t *</type>
- <name>tnet_stun_attribute_fingerprint_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2432db4c4bb63da2327bb357361eef21</anchor>
- <arglist>(uint32_t fingerprint)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_errorcode_t *</type>
- <name>tnet_stun_attribute_errorcode_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaa51e8bc565195298fb3de24070f5614a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_realm_t *</type>
- <name>tnet_stun_attribute_realm_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2d7ab50986b3af03951358ec4c2cfa8b</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_nonce_t *</type>
- <name>tnet_stun_attribute_nonce_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0cf404a4977b95a47c252f8101b099ce</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_unknowns_t *</type>
- <name>tnet_stun_attribute_unknowns_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8a497b2b11b1a776ec37170ee14b6ac2</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_software_t *</type>
- <name>tnet_stun_attribute_software_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga719d8c3ac6588124533f03f70877e437</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_altserver_t *</type>
- <name>tnet_stun_attribute_altserver_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga586636541b8ebb9ea46d4df39a448121</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_stun_attribute_deserialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga642d9b382cea0cbbf0590b8b60be54c6</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_attribute_serialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabb81a19c0eeb9f47f0b9599d65d61d6e</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_stun_attribute_pad</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga9364909d8a9c38fa1be0dd48efa3fac3</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a39de14fd624ed0daca8ee80b3b788167</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_mapped_addr_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a2069575f6768e7dbf84b722ab49e2092</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_xmapped_addr_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>aafd262dbecb13f75062287d1a53f79cb</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_username_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a061d0206949d7884f94db65fd4d13ff8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_integrity_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>adb93c2f122fac924c896e1d6e41dee12</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_fingerprint_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a1a8d87cb810361528f08db9ac6ad08d3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_errorcode_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>ae68e0c928ed436d9f61f3924b5bc937f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_realm_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a7e250a9748696036a59bd90577a803eb</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_nonce_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>aa0af7d26bae0b56988d370be6640c1c2</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_unknowns_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a78dfa6acb03b4b2097cb5cdf1cfc7559</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_software_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>a2b6d86a4a4f4ce12b7053a8804b6b773</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_altserver_def_t</name>
- <anchorfile>tnet__stun__attribute_8c.html</anchorfile>
- <anchor>ad40ed47dfee2cb3133324064dce05d37</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_stun_attribute.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/stun/</path>
- <filename>tnet__stun__attribute_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <class kind="struct">tnet_stun_attribute_s</class>
- <class kind="struct">tnet_stun_attribute_mapped_addr_s</class>
- <class kind="struct">tnet_stun_attribute_xmapped_addr_s</class>
- <class kind="struct">tnet_stun_attribute_username_s</class>
- <class kind="struct">tnet_stun_attribute_integrity_s</class>
- <class kind="struct">tnet_stun_attribute_fingerprint_s</class>
- <class kind="struct">tnet_stun_attribute_errorcode_s</class>
- <class kind="struct">tnet_stun_attribute_realm_s</class>
- <class kind="struct">tnet_stun_attribute_nonce_s</class>
- <class kind="struct">tnet_stun_attribute_unknowns_s</class>
- <class kind="struct">tnet_stun_attribute_software_s</class>
- <class kind="struct">tnet_stun_attribute_altserver_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_ATTRIBUTE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeec0275bf11e81b2b89c149df5194c51</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a62f9fefaa02d86218a754f2f8f9d9b68</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_addr_family_e</type>
- <name>tnet_stun_addr_family_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7080ca2a8d2b45a22d21c522a2a5a28f</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_attribute_type_e</type>
- <name>tnet_stun_attribute_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2e77e50a4af676b754191403ae102933</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_s</type>
- <name>tnet_stun_attribute_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3ce2a25dae1324a8dd545a68a2d8ccf3</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_stun_attributes_L_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a423021672c1cb1cfc6e87418925fee9d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_mapped_addr_s</type>
- <name>tnet_stun_attribute_mapped_addr_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga6ef5c5c6d47376dc7cf7ac14b923ad26</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_xmapped_addr_s</type>
- <name>tnet_stun_attribute_xmapped_addr_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8885759ce02dd0bebc0bee97ec48171c</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_username_s</type>
- <name>tnet_stun_attribute_username_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga33d875930c4e6213e7516e580a88eebb</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_integrity_s</type>
- <name>tnet_stun_attribute_integrity_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8b2b266a46e44c471708eca71ac8670a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_fingerprint_s</type>
- <name>tnet_stun_attribute_fingerprint_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7ead14f441ddf014894c17fcef2feeaf</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_errorcode_s</type>
- <name>tnet_stun_attribute_errorcode_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0e804aae488d73e576dd9c4453a93a04</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_realm_s</type>
- <name>tnet_stun_attribute_realm_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaf4ef4fa43bec46b6313c0c400d6c6ca</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_nonce_s</type>
- <name>tnet_stun_attribute_nonce_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7e4d37384aa42524d68d8e9e0ddc9ea2</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_unknowns_s</type>
- <name>tnet_stun_attribute_unknowns_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab27dd830e06e223350a584c41383015d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_software_s</type>
- <name>tnet_stun_attribute_software_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga5744df35d8bf1f1f366097f6a63f1177</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_altserver_s</type>
- <name>tnet_stun_attribute_altserver_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga1912ae8bc9ea407a04f1d16aa570dbc9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_addr_family_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3326fbcc063f264d3d359e922637e2e4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_ipv4</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3326fbcc063f264d3d359e922637e2e4a5663f4b60301ed2f9e7823613407dbed</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_ipv6</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3326fbcc063f264d3d359e922637e2e4a97e1e424d39a8af2791c1187090f111e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_attribute_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab696586b61219965987af1e017e6ffa6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reserved</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a5bf34ce06a004ad9f8db1dc687786273</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_mapped_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a9aadc5f8467c936cc7359889ba120e33</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_response_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a203b0a7edf4f8fb3381ac769595a2098</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_change_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6aeb35b7b83152b7a99bf46b4014928adc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_source_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a69f3448100d4f1a61536eb2c7315cd90</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_changed_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a0bd0d2c8f1d6ae85ffb58aeef4c01134</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_username</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a3247970572dad0c63e537b647dbd0861</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_password</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a432698b7b67cf13adf504f969abb60fd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_message_integrity</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ac20851e6e8fd2c479c0438b376987a85</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_error_code</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ab8571c9a5c334530ef9aa45adc7fd71e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_unknown_attributes</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a455d442e5c380953ff11c7e0d055f3ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reflected_from</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ae129dfcf945fe995400dba3e8b9895c5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_realm</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a0d8e28c40313d6d3b397ac957714cfee</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_nonce</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ae5dda080590c37e95953334f715ed3ef</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_xor_mapped_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6af70dcad086bff5d4ee77f093941642d2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_software</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ad5a2f9a89fbc825142e4d754b51bc125</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_alternate_server</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a4f263d754aaccf30fd861a934dfc12ba</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_fingerprint</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6aac669613b66507fba6c08d23a4283bf2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channel_number</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a7559421f1d46a400cdda94c32c3aff74</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_lifetime</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6aff4ed6f5e451f77b39d5113b9085493c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reserved2</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a626c6684c81f69c1649e178cc9847069</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_xor_peer_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ae14d3b3903934eab51356ad28584fc66</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_data</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ab85dfed04ff37affea00d10a517c72dd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_xor_relayed_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ada0a3d93b81c32a3d0af2ed20efffe71</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_even_port</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ac99da9ae2b9a6a885631e5e476293df2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_requested_transport</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a033a9a9cdad515c45291007be25dd028</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_dont_fragment</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a3f854135f19b767abc7e8031af6b5f88</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reserved3</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a57c9e8d7229d0989d73a5efc2fef36e7</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reservation_token</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a88373f0f1635103b2091910a9584c58d</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_stun_attribute_deserialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga642d9b382cea0cbbf0590b8b60be54c6</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_attribute_serialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabb81a19c0eeb9f47f0b9599d65d61d6e</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_stun_attribute_pad</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga9364909d8a9c38fa1be0dd48efa3fac3</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_stun_attribute_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga9a8fea6f7fb4c6236bc4df85153d6af4</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_mapped_addr_t *</type>
- <name>tnet_stun_attribute_mapped_address_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga28ffe32f830bbe0f5b32a207538eb8b6</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_xmapped_addr_t *</type>
- <name>tnet_stun_attribute_xmapped_address_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gacd4af1df8c9e298a23d34df27e5dcc45</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_username_t *</type>
- <name>tnet_stun_attribute_username_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab92c8f62b2d188c9ac1528aa03da4b7e</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_integrity_t *</type>
- <name>tnet_stun_attribute_integrity_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3c5f79313850ea8643132b093e11ef6a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_fingerprint_t *</type>
- <name>tnet_stun_attribute_fingerprint_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2432db4c4bb63da2327bb357361eef21</anchor>
- <arglist>(uint32_t fingerprint)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_errorcode_t *</type>
- <name>tnet_stun_attribute_errorcode_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaa51e8bc565195298fb3de24070f5614a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_realm_t *</type>
- <name>tnet_stun_attribute_realm_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2d7ab50986b3af03951358ec4c2cfa8b</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_nonce_t *</type>
- <name>tnet_stun_attribute_nonce_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0cf404a4977b95a47c252f8101b099ce</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_unknowns_t *</type>
- <name>tnet_stun_attribute_unknowns_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8a497b2b11b1a776ec37170ee14b6ac2</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_software_t *</type>
- <name>tnet_stun_attribute_software_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga719d8c3ac6588124533f03f70877e437</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_altserver_t *</type>
- <name>tnet_stun_attribute_altserver_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga586636541b8ebb9ea46d4df39a448121</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a1ed3e8d18968c427abbca5046e9a2aae</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_mapped_addr_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>ae158b2a2e20ebe910d5b937b6c31e8f5</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_xmapped_addr_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>ade3c87fd23c4418da071a962f4fa3a18</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_username_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a3618ce3b069dc37797b7a39e60342a2e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_integrity_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a76de57dbb7322cf91c856dd8d4bba3e9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_fingerprint_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a8d8cbe79ce3fa75cad33acb8edab5b98</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_errorcode_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a81aa99bbc4ef57f453b41485a6f2aa90</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_realm_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a0327c124b1eff63f330af0b55f02c1fa</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_nonce_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a6d2b7027e8dccf917a94b53703137b8a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_unknowns_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a0db4a8abf86d2e730755456eb372f7dd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_software_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a2fcc436a3a9b8217cb57779f66ab6844</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_attribute_altserver_def_t</name>
- <anchorfile>tnet__stun__attribute_8h.html</anchorfile>
- <anchor>a8d426ae80202c572513916de48cab014</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_stun_message.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/stun/</path>
- <filename>tnet__stun__message_8c</filename>
- <includes id="tnet__stun__message_8h" name="tnet_stun_message.h" local="yes" imported="no">tnet_stun_message.h</includes>
- <includes id="tnet__stun_8h" name="tnet_stun.h" local="yes" imported="no">tnet_stun.h</includes>
- <member kind="define">
- <type>#define</type>
- <name>SERIALIZE_N_ADD_ATTRIBUTE</name>
- <anchorfile>tnet__stun__message_8c.html</anchorfile>
- <anchor>a22b95434b0e041992dd2058e5688e696</anchor>
- <arglist>(att_name, payload, payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaf1892e2a30f8b85e4e5b47622a6b9f3</anchor>
- <arglist>(const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_create_null</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga938bc40f8bb818f87c94eb42352cd0f3</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_stun_message_serialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaefd2306ef33e3611a98394e5b274a069</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_deserialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0f5f3b814bb84f3cb62802b1d9af275e</anchor>
- <arglist>(const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_message_add_attribute</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gacb982af5ead9faf9e85b4e2f69e05d47</anchor>
- <arglist>(tnet_stun_message_t *self, tnet_stun_attribute_t **attribute)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_stun_attribute_t *</type>
- <name>tnet_stun_message_get_attribute</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeac2966bdc80f798ec61f6f7ebfc6a95</anchor>
- <arglist>(const tnet_stun_message_t *self, tnet_stun_attribute_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>short</type>
- <name>tnet_stun_message_get_errorcode</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7638d5816c344718874a113abd9739d5</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_stun_message_get_realm</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga6115407c7af73b3041c215ccd34e35b8</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_stun_message_get_nonce</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga5e068d5474bfbd73e8cece833deac6b2</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int32_t</type>
- <name>tnet_stun_message_get_lifetime</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga12380617e5a883d3c175216c48245839</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_stun_message_def_t</name>
- <anchorfile>tnet__stun__message_8c.html</anchorfile>
- <anchor>a19626e26e58ad7a9c09264174314053d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_stun_message.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/stun/</path>
- <filename>tnet__stun__message_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__stun__attribute_8h" name="tnet_stun_attribute.h" local="yes" imported="no">stun/tnet_stun_attribute.h</includes>
- <class kind="struct">tnet_stun_message_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_CLASS_REQUEST_MASK</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>aa3d2e023082dd0468d788a204e4f5588</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_CLASS_INDICATION_MASK</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>a6cb86b711e3aa24320405b60f2da1beb</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_CLASS_SUCCESS_MASK</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>a0134dd005c09929e5e557fe0d4b00ff4</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_CLASS_ERROR_MASK</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>aa1bad5b0786da02f7562d45b83e538fc</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_REQUEST</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga09a28b87a49c9242203c09d5fa56a1fe</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_INDICATION</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gac1faf702ec0e6fafd112c3d2b80e1af8</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_SUCCESS</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga98049d686a5db4369a7554a77bf26838</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_ERROR</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga10bdb77a5f51b4670be89302eb445974</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_IS_STUN2</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3b0b84dbb873d8c18c6e438bdf5053e8</anchor>
- <arglist>(PU8)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_TRANSACID_SIZE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaa796e7b0e870b335336c50024ef5823</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>uint8_t</type>
- <name>tnet_stun_transacid_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaab3bfd494f75601a0f26177c6d851810</anchor>
- <arglist>[TNET_STUN_TRANSACID_SIZE]</arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_class_type_e</type>
- <name>tnet_stun_class_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8db95f74a4953795bf182744e63eff78</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_method_type_e</type>
- <name>tnet_stun_method_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga145552721a7b4f524ceb40ac2da1038d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_message_type_e</type>
- <name>tnet_stun_message_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab3ed2f3313ef6914347c2e604d7cf104</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_message_s</type>
- <name>tnet_stun_message_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga4e9470802bdd2d8b0a1b90631369721e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_stun_message_t</type>
- <name>tnet_stun_response_t</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>ae36d2cd92b9d0f1ae545b4ba4241f35b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_stun_message_t</type>
- <name>tnet_stun_request_t</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>a5f7a4c74272f8549b89d8bb2ad6206b1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_class_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3faef946079e315842f5ad4d41aa0929</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a4617c080243a43b3d8f93bdfcc3f0f4b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a204a6136670e4ad622276ef22a2ae65e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a0f27f07bfc9be6aa217799fa088cf059</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a271a1bc249f8bc1af5b9e6308b166232</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_method_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga4701a0e3395592a6d6a742901212801c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_binding</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801cafd301f45e6297ffca65062c30b89ef53</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_allocate</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca166402bfafe37fa33b31f1466265798b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_refresh</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca6081fbd713a271d81264c919a589ce97</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_send</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca3c8e39a747df8f52dcc70d5d7db3e423</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_data</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca72ac38a767b77800980a5577dd13059c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_createpermission</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca45791d8de7420d9d3afccfc78ac8ba8b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_channelbind</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca9a883e8885d8eb35a93beccda692233c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_message_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabf2f8d8b846fe491470941a7e237559c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caef49ee403fb2e849831649e4c09729d4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca40f5bbd220cf9c1ec50654becc93c75f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca45e30ced8713c5c159bb45641ce04e79</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca9526f90725e2c9be01cd4ea2aa818e50</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cab3d8c425c241c43ab3bdbec7fdddc2dd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cadda6f40f23dc4bd53d1d6c068484ada0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caf20455522d8e72c9e055b8ea5ef2dabb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cae4d21e386431edf815a9a652f3d745a5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca3f15b1671e604a2fb7a65401756dccc0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca5130e27fd810862da942fcde58eb0c42</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caead4a26ba4d373a96e4dac68ff9fdb45</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca17067ce9dae33780b432c50b2a53130b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_send_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cac7424fdd7360f72326f8f9c74d36d15b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_data_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca66d958d23caaac30ab000f37c36a3406</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca55ffb1e77c92edb303a51f7221049c66</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cad1099efddc3ea3f8e91bd7953fef5c50</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caa804d83ad6928163af8e5b8c29c003dc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cad3da1d3b613236f00e9747a3874eb3c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caf9886f762e46af82fc8122ba35a95a8a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cae56d07904cc9d8091f32a6973258146f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cafcb4db651d71fd5c21f7bbb2def064a1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cab65200966087d7dd85dd17de30cde9ab</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_stun_message_serialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaefd2306ef33e3611a98394e5b274a069</anchor>
- <arglist>(const tnet_stun_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_deserialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0f5f3b814bb84f3cb62802b1d9af275e</anchor>
- <arglist>(const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_message_add_attribute</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gacb982af5ead9faf9e85b4e2f69e05d47</anchor>
- <arglist>(tnet_stun_message_t *self, tnet_stun_attribute_t **attribute)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_stun_attribute_t *</type>
- <name>tnet_stun_message_get_attribute</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeac2966bdc80f798ec61f6f7ebfc6a95</anchor>
- <arglist>(const tnet_stun_message_t *self, tnet_stun_attribute_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>short</type>
- <name>tnet_stun_message_get_errorcode</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7638d5816c344718874a113abd9739d5</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_stun_message_get_realm</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga6115407c7af73b3041c215ccd34e35b8</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_stun_message_get_nonce</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga5e068d5474bfbd73e8cece833deac6b2</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int32_t</type>
- <name>tnet_stun_message_get_lifetime</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga12380617e5a883d3c175216c48245839</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaf1892e2a30f8b85e4e5b47622a6b9f3</anchor>
- <arglist>(const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_create_null</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga938bc40f8bb818f87c94eb42352cd0f3</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_stun_message_def_t</name>
- <anchorfile>tnet__stun__message_8h.html</anchorfile>
- <anchor>a447a48c88e1eb9124f6ac0669a1f4000</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tinynet.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tinynet_8h</filename>
- <includes id="tnet_8h" name="tnet.h" local="yes" imported="no">tnet.h</includes>
- <includes id="tnet__nat_8h" name="tnet_nat.h" local="yes" imported="no">tnet_nat.h</includes>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <includes id="tnet__transport_8h" name="tnet_transport.h" local="yes" imported="no">tnet_transport.h</includes>
- <includes id="tnet__stun_8h" name="tnet_stun.h" local="yes" imported="no">stun/tnet_stun.h</includes>
- <includes id="tnet__dns_8h" name="tnet_dns.h" local="yes" imported="no">dns/tnet_dns.h</includes>
- <includes id="tnet__dns__naptr_8h" name="tnet_dns_naptr.h" local="yes" imported="no">dns/tnet_dns_naptr.h</includes>
- <includes id="tnet__dns__regexp_8h" name="tnet_dns_regexp.h" local="yes" imported="no">dns/tnet_dns_regexp.h</includes>
- <includes id="tnet__dns__resolvconf_8h" name="tnet_dns_resolvconf.h" local="yes" imported="no">dns/tnet_dns_resolvconf.h</includes>
- <includes id="tnet__dhcp_8h" name="tnet_dhcp.h" local="yes" imported="no">dhcp/tnet_dhcp.h</includes>
- <includes id="tnet__dhcp__option__sip_8h" name="tnet_dhcp_option_sip.h" local="yes" imported="no">dhcp/tnet_dhcp_option_sip.h</includes>
- <includes id="tnet__dhcp6_8h" name="tnet_dhcp6.h" local="yes" imported="no">dhcp6/tnet_dhcp6.h</includes>
- <includes id="tnet__dhcp6__option_8h" name="tnet_dhcp6_option.h" local="yes" imported="no">dhcp6/tnet_dhcp6_option.h</includes>
- </compound>
- <compound kind="file">
- <name>tinynet_config.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tinynet__config_8h</filename>
- <member kind="define">
- <type>#define</type>
- <name>TINYNET_API</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>aae93e76d17d1ca6ff95aad28b3abf658</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TINYNET_GEXTERN</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a81d479293190a58ef229b695fb4a8ab0</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_BEGIN_DECLS</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a75bf1f5d1f1371c87bf2f5d9d61f458b</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_END_DECLS</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a48c3cca1fa120fe82738d64e85c34351</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_INLINE</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a6e01306b61ca63a7ff08571c01bcd5e2</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_HAVE_POLL</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a874ab0cf7c6c9b54f2f2358e572a8b13</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_USE_POLL</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a02b04ca7920cac27006f37fe6ce2b2b1</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_HAVE_OPENSSL_H</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a3c43576dad07d045cd4c4c446f9c7d58</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>HAVE_IFADDRS</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a8118f3716bf12d7ac91e1955a6d44815</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>HAVE_DNS_H</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>af7c63ec812cd1f5b370213ed28f4d7c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_HAVE_SS_LEN</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>adb994877ac2c9fa8365b76bbe1c51df3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_HAVE_SA_LEN</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>ab912d02239aca3e7c941d670786cef33</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOFTWARE</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>ae2d04c0df9b8a96c09fde862ec6e4304</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_IANA_PEN</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>a612c5d1310d848ba03078217088c3d26</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_RESOLV_CONF_PATH</name>
- <anchorfile>tinynet__config_8h.html</anchorfile>
- <anchor>ab55f5a2cc9ce6e6b281afa7f869956f5</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_tls.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/tls/</path>
- <filename>tnet__tls_8c</filename>
- <includes id="tnet__tls_8h" name="tnet_tls.h" local="yes" imported="no">tnet_tls.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <class kind="struct">tnet_tls_socket_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_CIPHER_LIST</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a0272165dcd11efdaf43bac2d288a9a0e</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TLS_TIMEOUT</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a8a5893e48b2a03cdf2ad2fdf4dab27fb</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TLS_RETRY_COUNT</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>acf3b352408903e8954c01cdc9999d0ee</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_tls_socket_s</type>
- <name>tnet_tls_socket_t</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>ab3bf41a1258ce44672ff13f23a2ecf17</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_tls_socket_handle_t *</type>
- <name>tnet_tls_socket_create</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>aa476446bdb416f8a15166aa970210c67</anchor>
- <arglist>(tnet_fd_t fd, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk, tsk_bool_t isClient)</arglist>
- </member>
- <member kind="function">
- <type>tnet_tls_socket_handle_t *</type>
- <name>tnet_tls_socket_client_create</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a489d9a614ddd2601c24ad12d50563e90</anchor>
- <arglist>(tnet_fd_t fd, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="function">
- <type>tnet_tls_socket_handle_t *</type>
- <name>tnet_tls_socket_server_create</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>ae768e179e55c549c7bd083f1d071a2d0</anchor>
- <arglist>(tnet_fd_t fd, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_isok</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a73d773e2a5cf277245d76815916f421f</anchor>
- <arglist>(const tnet_tls_socket_handle_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_connect</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a188bd068a96c3acc2f031cb6d04d4458</anchor>
- <arglist>(tnet_tls_socket_handle_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_write</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a43612982a13f6f14301034c5ce1b7cb7</anchor>
- <arglist>(tnet_tls_socket_handle_t *self, const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_recv</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>ab488d9a8df546856d7becf958b9d0118</anchor>
- <arglist>(tnet_tls_socket_handle_t *self, void **data, tsk_size_t *size, int *isEncrypted)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_init</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>ab596811e9f03aec6c3a8abd03ee2c236</anchor>
- <arglist>(tnet_tls_socket_t *socket)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_tls_socket_def_t</name>
- <anchorfile>tnet__tls_8c.html</anchorfile>
- <anchor>a4e4baa33e452176cd4a4a52ca5148bcf</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_tls.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/tls/</path>
- <filename>tnet__tls_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <member kind="define">
- <type>#define</type>
- <name>tnet_tls_socket_send</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>ae8efefb3d96440fe53fc8a4572613c5e</anchor>
- <arglist>(self, data, size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_isok</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a73d773e2a5cf277245d76815916f421f</anchor>
- <arglist>(const tnet_tls_socket_handle_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_connect</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a188bd068a96c3acc2f031cb6d04d4458</anchor>
- <arglist>(tnet_tls_socket_handle_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_write</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a43612982a13f6f14301034c5ce1b7cb7</anchor>
- <arglist>(tnet_tls_socket_handle_t *self, const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_tls_socket_recv</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>ab488d9a8df546856d7becf958b9d0118</anchor>
- <arglist>(tnet_tls_socket_handle_t *self, void **data, tsk_size_t *size, int *isEncrypted)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_tls_socket_handle_t *</type>
- <name>tnet_tls_socket_create</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a0077588b0fbe21d67d69a5c143371886</anchor>
- <arglist>(tnet_fd_t fd, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk, tsk_bool_t isClient)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_tls_socket_handle_t *</type>
- <name>tnet_tls_socket_client_create</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a094399bed4701b4f5a9d1b98b86a6d6f</anchor>
- <arglist>(tnet_fd_t fd, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_tls_socket_handle_t *</type>
- <name>tnet_tls_socket_server_create</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a30520b6f3ff7d662da176c5f6c9b2c05</anchor>
- <arglist>(tnet_fd_t fd, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="variable">
- <type>TNET_BEGIN_DECLS typedef void</type>
- <name>tnet_tls_socket_handle_t</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a6f1311b1d1c8744b36092ebcbf1a3b87</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_tls_socket_def_t</name>
- <anchorfile>tnet__tls_8h.html</anchorfile>
- <anchor>a8ed545d5b0d5aad6da18b942e2b53e1a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet_8c</filename>
- <includes id="tnet_8h" name="tnet.h" local="yes" imported="no">tnet.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <member kind="function">
- <type>int</type>
- <name>tnet_startup</name>
- <anchorfile>tnet_8c.html</anchorfile>
- <anchor>ae58106beb601241b29d944fe40c8f300</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_cleanup</name>
- <anchorfile>tnet_8c.html</anchorfile>
- <anchor>ac42b22a7ac5831f04326aee9de033c84</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>tnet_isBigEndian</name>
- <anchorfile>tnet_8c.html</anchorfile>
- <anchor>acd8f51d06c3a3d408e2b52428034cc24</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <member kind="function">
- <type>TNET_BEGIN_DECLS TINYNET_API int</type>
- <name>tnet_startup</name>
- <anchorfile>tnet_8h.html</anchorfile>
- <anchor>a4ed9dafe102a2a8e0789f0c901206963</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_cleanup</name>
- <anchorfile>tnet_8h.html</anchorfile>
- <anchor>a3347306376677277d94b22ea3770cac6</anchor>
- <arglist>()</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_auth.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__auth_8c</filename>
- <includes id="tnet__auth_8h" name="tnet_auth.h" local="yes" imported="no">tnet_auth.h</includes>
- </compound>
- <compound kind="file">
- <name>tnet_auth.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__auth_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- </compound>
- <compound kind="file">
- <name>tnet_endianness.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__endianness_8c</filename>
- <includes id="tnet__endianness_8h" name="tnet_endianness.h" local="yes" imported="no">tnet_endianness.h</includes>
- <includes id="tnet_8h" name="tnet.h" local="yes" imported="no">tnet.h</includes>
- <member kind="function">
- <type>unsigned short</type>
- <name>tnet_htons</name>
- <anchorfile>tnet__endianness_8c.html</anchorfile>
- <anchor>a81f024d1f14e062410246f86802d12b3</anchor>
- <arglist>(unsigned short x)</arglist>
- </member>
- <member kind="function">
- <type>unsigned short</type>
- <name>tnet_htons_2</name>
- <anchorfile>tnet__endianness_8c.html</anchorfile>
- <anchor>a275f5dd051fd16045c4e893c32bac06c</anchor>
- <arglist>(const void *px)</arglist>
- </member>
- <member kind="function">
- <type>unsigned long</type>
- <name>tnet_htonl</name>
- <anchorfile>tnet__endianness_8c.html</anchorfile>
- <anchor>a9c62f72b9d9f37546da167712dd3d706</anchor>
- <arglist>(unsigned long x)</arglist>
- </member>
- <member kind="function">
- <type>unsigned long</type>
- <name>tnet_htonl_2</name>
- <anchorfile>tnet__endianness_8c.html</anchorfile>
- <anchor>a8f8cd820e624e51cce6a5c4f801a6f46</anchor>
- <arglist>(const void *px)</arglist>
- </member>
- <member kind="function">
- <type>tsk_bool_t</type>
- <name>tnet_is_BE</name>
- <anchorfile>tnet__endianness_8c.html</anchorfile>
- <anchor>a8e88a1ef1bc84108223787779f504a41</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>tnet_isBigEndian</name>
- <anchorfile>tnet__endianness_8c.html</anchorfile>
- <anchor>acd8f51d06c3a3d408e2b52428034cc24</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_endianness.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__endianness_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <member kind="define">
- <type>#define</type>
- <name>tnet_ntohs</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>a173b0ead154f408f9431cb89f167db7d</anchor>
- <arglist>(x)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_ntohs_2</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>a75320a16b5817e68c17bb33f4e10c811</anchor>
- <arglist>(px)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_ntohl</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>a3421e42a8d227dfd846bccb37f0dc490</anchor>
- <arglist>(x)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_ntohl_2</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>ae1122c736d013aa5cd562e6b9f2a2096</anchor>
- <arglist>(px)</arglist>
- </member>
- <member kind="function">
- <type>TNET_BEGIN_DECLS TINYNET_API TNET_INLINE unsigned short</type>
- <name>tnet_htons</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>a9128b3b5b1eb078b0ae063c279cf6614</anchor>
- <arglist>(unsigned short x)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API TNET_INLINE unsigned short</type>
- <name>tnet_htons_2</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>a76d99c559f54d176c76e1d0b7cec11d1</anchor>
- <arglist>(const void *px)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API TNET_INLINE unsigned long</type>
- <name>tnet_htonl</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>ae3b9343ade3115c02db59eaacf9c07a3</anchor>
- <arglist>(unsigned long x)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API TNET_INLINE unsigned long</type>
- <name>tnet_htonl_2</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>aaa4d43dde222ab2d0b7191b071073f2c</anchor>
- <arglist>(const void *px)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API TNET_INLINE tsk_bool_t</type>
- <name>tnet_is_BE</name>
- <anchorfile>tnet__endianness_8h.html</anchorfile>
- <anchor>a1c7a87c0f35e81028d0f636b398e43d9</anchor>
- <arglist>()</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_hardwares.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__hardwares_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS enum tnet_hardware_type_e</type>
- <name>tnet_hardware_type_t</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>ab3965c39fd276c764c0e59d2a1bb010a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_hardware_type_e</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Ethernet_10Mb</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cbab973f191210bbc4e5c4c2fe741d81b78</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Ethernet_3Mb</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cbac897b3c01ee006b71c41fba02c145056</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_AX_25</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba6886c8486caa3f75207f3a1c17b6fa24</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Token_Ring</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba2f09deb1fad80172d241c4abbddc81cb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Chaos</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba6bada0b3a49c4d4eb9407ade58dc340e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_IEEE_802_Networks</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba30df3e42f825f3ea51d8f6dbdf015649</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_ARCNET</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba6fe010a6818866fa788b3a77d559c61a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Hyperchannel</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba1e8e9de9afe46777392cd2df3770bdc3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Lanstar</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cbae739a32782957a1d35cac1fe0baae7ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Autonet_Short_Address</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba9112021ec25e617eadbb93a764765563</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_ALocalTalk</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba4cd5f244ef725671f9dff6bedf451765</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_LocalNet</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba37870cb45352e7de380499f0b4b42c22</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Ultra_link</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba0940480918527435321bdd93a46557a0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_SMDS</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba73dc9b1bdd675ecf6f3933383fa8d551</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_Frame_Relay</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cba4acacd1d8fadbdb927193083052d5e0a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_htype_ATM</name>
- <anchorfile>tnet__hardwares_8h.html</anchorfile>
- <anchor>a9707b4f020ac44c0ccd61ec6636a91cbaaca0d9ed7748a27d0f4dd7c05b9b28e8</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_nat.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__nat_8c</filename>
- <includes id="tnet__nat_8h" name="tnet_nat.h" local="yes" imported="no">tnet_nat.h</includes>
- <includes id="tnet__endianness_8h" name="tnet_endianness.h" local="yes" imported="no">tnet_endianness.h</includes>
- <member kind="function">
- <type>tnet_nat_context_handle_t *</type>
- <name>tnet_nat_context_create</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga49c2521bd48d6df2ce3a46e066ebe874</anchor>
- <arglist>(tnet_socket_type_t socket_type, const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>__pred_find_turn_allocation</name>
- <anchorfile>tnet__nat_8c.html</anchorfile>
- <anchor>ace6d31bc9dea175a5262eac6fcff6780</anchor>
- <arglist>(const tsk_list_item_t *item, const void *id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>__pred_find_stun_binding</name>
- <anchorfile>tnet__nat_8c.html</anchorfile>
- <anchor>a8c276667804d2cf335a29d74008a46e2</anchor>
- <arglist>(const tsk_list_item_t *item, const void *id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>__pred_find_turn_channel_binding</name>
- <anchorfile>tnet__nat_8c.html</anchorfile>
- <anchor>ae3753168b39e7bc9f746ba229c7d277e</anchor>
- <arglist>(const tsk_list_item_t *item, const void *id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_address_tostring</name>
- <anchorfile>tnet__nat_8c.html</anchorfile>
- <anchor>aae3c07155263489e90e7575060571a28</anchor>
- <arglist>(const uint8_t in_ip[16], tnet_stun_addr_family_t family, char **out_ip)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_set_server_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga60f64045a1a894a41afdb73a332f8732</anchor>
- <arglist>(tnet_nat_context_handle_t *self, const char *server_address)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_set_server</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gadb5209238b5596dac88606e5130dc93f</anchor>
- <arglist>(tnet_nat_context_handle_t *self, const char *server_address, tnet_port_t server_port)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_binding_id_t</type>
- <name>tnet_nat_stun_bind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gaedaee292e59564e952b1ddda3b82f0a6</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, const tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_stun_get_reflexive_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga806a269daee5625262abe17c730d6bfc</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_stun_binding_id_t id, char **ipaddress, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_stun_unbind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gac7501503711b402a1863967000970e16</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_stun_binding_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_id_t</type>
- <name>tnet_nat_turn_allocate</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga0388eae3c1cb2390070e49845a9e7a33</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, const tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_get_reflexive_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4417d9c60fcfae071ffee563b1e5f4dd</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, char **ipaddress, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_allocation_refresh</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga6c0eb272fdaf34b696f40aa7f5279c24</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_unallocate</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga5ffc9393817f43bdd1331454a6f8af6e</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_id_t</type>
- <name>tnet_nat_turn_channel_bind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga2c1bed31feafaa25d30cf8cc92b0b9e5</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, struct sockaddr_storage *peer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_channel_refresh</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4995c26dc8e520f2820924082b1c5193</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_channel_binding_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_channel_send</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga69719fb972fa3ccf667dd3999c221e8c</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_channel_binding_id_t id, const void *data, tsk_size_t size, int indication)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_add_permission</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga67181e6f65d829d44089841fd72429f0</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, const char *ipaddress, uint32_t timeout)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_nat_context_def_t</name>
- <anchorfile>tnet__nat_8c.html</anchorfile>
- <anchor>a9129d9b49b76e3c71058b17443d1fd21</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_nat.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__nat_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__stun_8h" name="tnet_stun.h" local="yes" imported="no">stun/tnet_stun.h</includes>
- <includes id="tnet__turn_8h" name="tnet_turn.h" local="yes" imported="no">turn/tnet_turn.h</includes>
- <includes id="tnet__proto_8h" name="tnet_proto.h" local="yes" imported="no">tnet_proto.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <class kind="struct">tnet_nat_context_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_NAT_DEFAULT_RTO</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga18cf72a341f3c785ab00a746286db1e6</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_NAT_DEFAULT_RC</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga5e809d1461c049e1830e5d376a07bd11</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_NAT_TCP_UDP_DEFAULT_PORT</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga0a871f1c40c7acb827f0513958ec8b21</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_nat_turn_channel_sendindication</name>
- <anchorfile>tnet__nat_8h.html</anchorfile>
- <anchor>a90eee7a015088fda4281cb913d998f6f</anchor>
- <arglist>(context, channel_id, data, size)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_nat_turn_channel_senddata</name>
- <anchorfile>tnet__nat_8h.html</anchorfile>
- <anchor>a66bbb47e80ab5c9ba3252d2dae1dbc06</anchor>
- <arglist>(context, channel_id, data, size)</arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_nat_context_s</type>
- <name>tnet_nat_context_t</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4d037b7a4416b7e876163d3c05256a1e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>void</type>
- <name>tnet_nat_context_handle_t</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga82ef754b59414ada0129fa558e9f3ec2</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_set_server_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga60f64045a1a894a41afdb73a332f8732</anchor>
- <arglist>(tnet_nat_context_handle_t *self, const char *server_address)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_set_server</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gadb5209238b5596dac88606e5130dc93f</anchor>
- <arglist>(tnet_nat_context_handle_t *self, const char *server_address, tnet_port_t server_port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_stun_binding_id_t</type>
- <name>tnet_nat_stun_bind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gaedaee292e59564e952b1ddda3b82f0a6</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, const tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_stun_get_reflexive_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga806a269daee5625262abe17c730d6bfc</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_stun_binding_id_t id, char **ipaddress, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_stun_unbind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gac7501503711b402a1863967000970e16</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_stun_binding_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_turn_allocation_id_t</type>
- <name>tnet_nat_turn_allocate</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga0388eae3c1cb2390070e49845a9e7a33</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, const tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_turn_get_reflexive_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4417d9c60fcfae071ffee563b1e5f4dd</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, char **ipaddress, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_turn_allocation_refresh</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga6c0eb272fdaf34b696f40aa7f5279c24</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_turn_unallocate</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga5ffc9393817f43bdd1331454a6f8af6e</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_turn_channel_binding_id_t</type>
- <name>tnet_nat_turn_channel_bind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga2c1bed31feafaa25d30cf8cc92b0b9e5</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, struct sockaddr_storage *peer)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_turn_channel_refresh</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4995c26dc8e520f2820924082b1c5193</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_channel_binding_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_turn_channel_send</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga69719fb972fa3ccf667dd3999c221e8c</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_channel_binding_id_t id, const void *data, tsk_size_t size, int indication)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_nat_turn_add_permission</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga67181e6f65d829d44089841fd72429f0</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, const char *ipaddress, uint32_t timeout)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_nat_context_handle_t *</type>
- <name>tnet_nat_context_create</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga49c2521bd48d6df2ce3a46e066ebe874</anchor>
- <arglist>(tnet_socket_type_t socket_type, const char *username, const char *password)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_nat_context_def_t</name>
- <anchorfile>tnet__nat_8h.html</anchorfile>
- <anchor>a6efcbbf185da7cd50b10cc78f223e46a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_poll.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__poll_8c</filename>
- <includes id="tnet__poll_8h" name="tnet_poll.h" local="yes" imported="no">tnet_poll.h</includes>
- <member kind="function">
- <type>int</type>
- <name>tnet_poll</name>
- <anchorfile>tnet__poll_8c.html</anchorfile>
- <anchor>a147d061600de2ae7ccae4be7e684cd26</anchor>
- <arglist>(tnet_pollfd_t fds[], tnet_nfds_t nfds, int timeout)</arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_poll.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__poll_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <class kind="struct">tnet_pollfd_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_POLLIN</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>a18775ebc9b7104b9f11a4a8fc55d3a35</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_POLLPRI</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>abf4d35cf7bdf033582b3924fd52b8c12</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_POLLOUT</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>a80781270d308060f4c60c6c2a060d220</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_POLLERR</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>afd3b08fb6323bb630da2b505792dd5dc</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_POLLHUP</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>a1a33190a36a7edfd9feef5cc649ad0e3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_POLLNVAL</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>a56b727a4ad4aae8a5a3c69d48704fb1b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_pollfd_s</type>
- <name>tnet_pollfd_t</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>a5d1c470f484862679cb042dece893771</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_poll</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>a147d061600de2ae7ccae4be7e684cd26</anchor>
- <arglist>(tnet_pollfd_t fds[], tnet_nfds_t nfds, int timeout)</arglist>
- </member>
- <member kind="variable">
- <type>TNET_BEGIN_DECLS typedef unsigned long</type>
- <name>tnet_nfds_t</name>
- <anchorfile>tnet__poll_8h.html</anchorfile>
- <anchor>af96f099a93a4e28b49e802276e14b09b</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_proto.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__proto_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <member kind="typedef">
- <type>enum tnet_proto_e</type>
- <name>tnet_proto_t</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a27bb5837a79968f327ad1a267a8c889c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_proto_e</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_HOPOPT</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf3e47a1629582de15246a7167a0bdd16</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ICMP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf865505c8426585ea585708127320a83</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IGMP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea26433dfcf3cded8b37cf14e85cc3f7ab</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_GGP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaace31a772721b89e781980decbd241df</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae52d5e72b84fb84fa5eaa10540d793d5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ST</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeabb3aad067064efaca8edfafca3dc5313</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TCP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea9435391a4b92958ff1b572fda6e5de06</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CBT</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea50c34cc36ebac6575280c91a53f55e56</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_EGP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeacaba03f5ed57c57010aa4f7ce160e028</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IGP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaefec4433c2ebe190a48a58eb86370522</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_BBN_RCC_MON</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea4e9f8d8e68b675dccc06b04d6d5dd6f8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_NVP_II</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaa3c0b656773e9e04e8bc86dcdd1420a6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PUP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea4fb43aa371a2864f156e4cce1b6e388f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ARGUS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea4f8301edc15722f5262a086bf98184ea</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_EMCON</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea39ab7c2ef09951ca1c1f0c3c67524f3c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_XNET</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea054eba5ab5a811bbd20049468a61ec9c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CHAOS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeabda0e6c71bb52cb79a58b9d158ed4f5e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_UDP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab30520cf1f872f6295ad002ebbdeada2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MUX</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaaa50ec2e5cb8efcae5d4280e852f440e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_DCN_MEAS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeabd9ac558d333c6f5e100980dd61a4f1c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_HMP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea04aa90429252022197d71301737d9e91</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PRM</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aead370323784a60ce792f6302ec283b3e1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_XNS_IDP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea6395e15ee84f3267e20862601af11c44</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TRUNK_1</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea20a62b2324ba93e34219549ccf6616cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TRUNK_2</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaee772df2109724660e22843029a78001</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_LEAF_1</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaba4591261fca995da12939a87dca2f8d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_LEAF_2</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab46c29f0e2e062d3fe07daf39273bd34</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_RDP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea517b71e70817cc73e07779730b2f7165</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IRTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae13acc04aa32d48d6d5e223e8850b2ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ISO_TP4</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea93464153b54e36073d5800322ec2f0a1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_NETBLT</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea17bc22f36029bd02a60768c4d617f017</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MFE_NSP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea012f95544ab4b0e9abb0aab5727ec85e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MERIT_INP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea70b4c6a63c4f2e5165df28537a87e35a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_DCCP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaa833da1668e07e6cd23c58e5a4453cb8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_3PC</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea64cfc68e827206b5aa16a2044a635ef6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IDPR</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea0f404ea94e7869b1c291cf691a5142ee</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_XTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea77985b0994cdd86feb7f237229ec2510</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_DDP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea51f5684c0ecd0df92cea76008334042b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IDPR_CMTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea8b5687e2751a055d7bb1211c35a41f16</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TP_PP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea47843d626abcb8aa8d8ae64b2a85eb2b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IL</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea9693931b5c7c19c1a4a9536b6cd0c927</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPv6</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea1e3279cb942513c78e96d07611e1c807</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SDRP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea15392913ac5f2dd4449991c9979d7dfd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPv6_Route</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf61f8f71a9115ac879452ba0882d1233</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPv6_Frag</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaa1d78d263cd7197a91160b15bb6a26b2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IDRP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea1400b8a16f2ac5e35aa201a1deeaf35f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_RSVP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea93fc82a4b0f05472fdf72bcbb3a78039</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_GRE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab02932b56775158f9defaebbb6d67cdc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_DSR</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea81a55e871f9b9eae24cbc113b2f97494</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_BNA</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab394f5c29aa46f830e2183589ffe5099</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ESP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea29a02ced688139bff0bef253bb461ee1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_AH</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea9059e24e96769fcf1a382d8abe3d256e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_I_NLSP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea0c94154394b65fd6d5d3038e5936700e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SWIPE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea570fafde2ba504c828e5e1ea29fc0e29</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_NARP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea8bf22c4615143141a45f59c76b1f47ff</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MOBILE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf0ccd8ed530ff2ff6d4d71cf5d317565</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TLSP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea8fb5426051f59e24b779b3fc7698ddf0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SKIP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea225f1051b106ed58e22addff8d499376</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPv6_ICMP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea62eff837f8816a052c697ab4e41ecc97</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPv6_NoNxt</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea6085956fd26c4a20ce79363979848d8a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPv6_Opts</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea95b1f2a54b04b3a179772ba3130db77e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ANY_INTERNAL</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea2859d72882404810011b78d7012e061b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CFTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea00950076d09f14d08d0f0858c26361e0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ANY_LOCAL</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaaed167548d4677aff1c8597b2fe38355</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SAT_EXPAK</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea29981fe207506ea4d111ccc2cd1b706b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_KRYPTOLAN</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea55b992f416f6568a7491c2dc92003a02</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_RVD</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf7b535cc4f183a300ef3585fd0c7709a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPPC</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea7f5a3ca6ee5590c96204b3c760e0aab7</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ANY_DISTRIBUTED</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeac335cdea345a239d64afc7ea15df455b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SAT_MON</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeadfa9bdbf063ec12290969b909bbbae7d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_VISA</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeadc121b25976e2b89f687eeaaa7198926</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPCV</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea7ca1714ed0a1befdea1322004750834a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CPNX</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea21702fc04028001091718e7ec3f68049</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CPHB</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aead30a6979e388107238e864df64d5fa52</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_WSN</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeacfa6a2dcb25628b1eb837db3f198384c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PVP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae3a08bedc4bfc8504f9b6c69c16640de</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_BR_SAT_MON</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aead4217c62a62f2db7ba92b397c090083e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SUN_ND</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea0906af73c851e2328283a7bb7cf2db51</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_WB_MON</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea2f96458c8c0785a44c3755a2eb38a24a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_WB_EXPAK</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea18d3794110ef7a0d3a2872c32170bac3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ISO_IP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea896824b5ad131da8acb7524b4d3f1e00</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_VMTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea89f9c06f2e5b1a8e27e2df1f3c678e9f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SECURE_VMTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea047328a5839ab985585203106f27a555</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_VINES</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea020bc53b165ce3d2fbf6ed68d5f7de16</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea545a0d51c04bde9d068d6bc847af2446</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_NSFNET_IGP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea3159d9719df7c3c1957cd41318ad3364</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_DGP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaac8dd71e6b5d9ecaaf6e3d4cfcd2bded</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_TCF</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaad09c0dc637474467e948e826b3491c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_EIGRP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea5c35e9e935b96097e9509b307b7c90c6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_OSPFIGP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea01586d5552d8819526e76c9e8432e7bd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_Sprite_RPC</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae3294f17f28d481cb31855f51e1ec5ce</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_LARP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea258f4746d9685bc2fb3b9f0220f3f598</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae94ca21d099378d112215a30bac5ea31</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_AX25</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae94173efea22c7d9f7cf5794bda60aa4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPIP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaa16dd3a301dcbc54559e455faa214812</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MICP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaa0922213e13e21bdc6fc47e3bb8cb4b3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SCC_SP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaddac121f42d652639b9f1a4ab6334063</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ETHERIP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea4a7ee55e10ffa2889ec864061dfd9b9c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ENCAP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab986fd0f9979b7ac8e455cbdc9a04f1c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ANY_PRIV_ENC</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae6f6341420590c4c0040bbf83431ea17</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_GMTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea75d6d6bc3194fc7c7f599bec6c8bed2a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IFMP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeae8deddd55ef97c55b1707eb27120eb6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PNNI</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea4e650d53603aa759da5fb46f782c7e56</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PIM</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaec3d01e4d23894337b910be097850f23</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ARIS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeac43b97e29a7379567ee6251c769bd8e5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SCPS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeafb9e0fa6695a4f06fd7301d447626e3c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_QNX</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaa2e009b3e9fdcd0df179541b4759dc78</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_AN</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaaee72de21586a71ec9c1de6d26103d1c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPComp</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea005d08c204eb3c9ce4fda7c5fc4878e1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SNP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea8a22527178dadb5364f7db341ffeabdf</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_Compaq_Peer</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab461495ddf6658ccc480ebeb206164b1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPX_in_IP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea97059663628127b1738ab943f2a9a328</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_VRRP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea438c7667da58dc528ebca5585434395f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PGM</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea9b0f254b4d98d7400ccca0e118e5fc37</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ANY_ZERO_HOP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea7deb4eda317e225c0e27d77a3567f74e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_L2TP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea58bd0e0146b11ee58c6d32174222cf71</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_DDX</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeabe680f2fc13b17024c29652b1518ebb5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IATP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf87e18441522469fb469e52e1d61906e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_STP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea2ab5fe4b262d01b655f3c925836e15a6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SRP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea06e1214849c2b9dc1cfff07e56e925e4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_UTI</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea6877ea94d0755a7204ff222e19c79e95</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SMP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaecc99400bff657c2154f4594f37facb0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SM</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea2487fe9fb7cd4bdaa17b2c657ba15018</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab4f0e82e3b661d2de0c4d78eb03c5bc3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_ISIS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea1a55c6e1112e448829b94b4091c71e7a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_FIRE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea38e6407861f800399ec1a34ec0fde2a4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CRTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea838510d7c0e658ee495c6f0dfbafbb91</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_CRUDP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab56bfcfdcf725c415669866200591241</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SSCOPMCE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea8fe3318bbe97b7715d8ff65d83a5749e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_IPLT</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeafc93dfcadfa47d380c5d9a392dca117f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SPS</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeac588ec81d589776abbcf05424414f920</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_PIPE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeab3c05bc815d37d488645a9a605e883b8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_SCTP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea02944136413e06785c6cbd44f52359e3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_FC</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaaafd42469743174f7fb479a473a3a035</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_RSVP_E2E_IGNORE</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaf96abbab80993204b88377ca806d4235</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_Mobility_Header</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeabc2a94748b995a2c3068d534f65d604a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_UDPLite</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea0f2f4b0c97c3919d1c1db0742ae80af4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_MPLS_in_IP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea42147d339151a3053ddcb842e92fa187</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_manet</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea7d7940d2179419a2dfefe6c2242032a7</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_HIP</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea37643c9ab3ed8de3edd86dc9e05e562a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_Shim6</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea5d9aea6e62dbac43c596bc996dfc025a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_EXP1</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea9c841d3e3f7f40a12b5b6851e87dd61b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_EXP2</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aea0f8c7369c55e0c77d35a9de71a4a21a9</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>TNET_PROTO_Reserved</name>
- <anchorfile>tnet__proto_8h.html</anchorfile>
- <anchor>a0a5a9fc22fd159c4a6c3ba14951133aeaed0bace331ff7d5ce6a0fcffa58cfd2d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_socket.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__socket_8c</filename>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <member kind="function">
- <type>tnet_socket_t *</type>
- <name>tnet_socket_create_2</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>ga8ef4f4ef1882fb31a2db42c4ff0f6b3f</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, tsk_bool_t nonblocking, tsk_bool_t bindsocket)</arglist>
- </member>
- <member kind="function">
- <type>tnet_socket_t *</type>
- <name>tnet_socket_create</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>ga44cfc3407bc375c5b932bfe45a9de849</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_socket_close</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>gad66bdc608588cb77d2f6447ef39927f1</anchor>
- <arglist>(tnet_socket_t *sock)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_socket_set_tlsfiles</name>
- <anchorfile>tnet__socket_8c.html</anchorfile>
- <anchor>ae5d76c52ce040fb833a5b5cfccf77dd2</anchor>
- <arglist>(tnet_socket_tls_t *socket, int isClient, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_socket_def_t</name>
- <anchorfile>tnet__socket_8c.html</anchorfile>
- <anchor>a0b84352684cbba68fd098ba5801da787</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_socket.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__socket_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <includes id="tnet__tls_8h" name="tnet_tls.h" local="yes" imported="no">tls/tnet_tls.h</includes>
- <class kind="struct">tnet_socket_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IPV4</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a74e1b90dfbc2a5eb72f86e20c3391b59</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_UDP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a4a39d9f77a2c0f974f3a5ebb8a80992d</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_TCP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aa95c678d99efa12a7a5400f8b82ddad5</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_TLS</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aca18b3796e1a0244078292db73a5c20e</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SCTP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a48fcfca9ecec785918601fd863ba10cf</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IPSEC</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a63282a2cae8654c1d2882662580d05ea</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IPV6</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aa41f8ec0c07e2ee94feb2b6be80fca2a</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IPV46</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aed444b967bd2b8f0bd89b4b3c80d8762</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_IS_VALID</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aaea09b2a77f6f12d48823836a8f44e3c</anchor>
- <arglist>(socket)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_STREAM</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a524680417e129af2019545bef449225f</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_DGRAM</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a33975122769a5a67cbeccaee9eb9a97b</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_IPV4</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a8eeb8682e7f29f4eda0b53e4a2d23b73</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_IPV6</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a0b6df4149ae8f6b96974152b910cf518</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_IPV46</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a1c7630358e600dfea260ef4de88a04cd</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_IPSEC</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a691d1054b9ba60c8acfd939ee1ac30e0</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_UDP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>afed2197fb95bdd5b24a2241717b9785a</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_TCP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aeb0cd6fa3f1666aa122242e90d2a8983</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_TLS</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ae1ae1b3c50657b6202cfc962085db773</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_SCTP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a502f2a14d70745355c989c7d171ccc6d</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_IS_SECURE</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ae71d33e0a1a343f2cf4d2e54f3370730</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_UNSET</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ab4ef32a80f5d86de4033f2b0467cf848</anchor>
- <arglist>(type, OP)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_IPV4</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a97be443ebd7a06b835cd545eed66d3dc</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_IPV4Only</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aba4aad26261c9807d70f6fb2020d684a</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_IPV6</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a53363b809815b0fdbcc8b2b3e52d08b0</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_IPV6Only</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a1b5a72e73a32f688d1c22a3b6ce20804</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_IPSEC</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aadb0b3ed0d2be77ea464ddcffba4b36d</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_UDP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a2db025967772ce44fb5844b9e70b02ea</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_TCP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a901c93fdc876a6787bf71867318e3f80</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_TLS</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a69a1c4e47a7412f8739d922dd294c1d6</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_TYPE_SET_SCTP</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a2520e87cbac118e7de1dc8062f534271</anchor>
- <arglist>(type)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_HOST_ANY</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>aa6e6dcfb2a211eed85fe668cfc0c3632</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_SOCKET_PORT_ANY</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ad247279879162ea5d5484ce8e9b244fb</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS enum tnet_socket_type_e</type>
- <name>tnet_socket_type_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a576cd9bf9d800834987f993c8f6c17e1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_socket_s</type>
- <name>tnet_socket_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a25420c64ae82e009d5e593315c02a8a3</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_socket_t</type>
- <name>tnet_socket_udp_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a4b3efb6a5a35e78092888202401e1c5e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_socket_t</type>
- <name>tnet_socket_tcp_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a23360f55c1880d6abea27966a299ee96</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_socket_t</type>
- <name>tnet_socket_tls_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a84d882faf5cb0e466532c54b05c36036</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tnet_socket_t</type>
- <name>tnet_socket_ipsec_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a02562d642430b5eee0000d90e96af005</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_sockets_L_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ac361e0e716e059ae9ef1f51d01e817a6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_socket_type_e</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ab37bfdb5ac374384872091d48e3895bb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>tnet_socket_type_invalid</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ab37bfdb5ac374384872091d48e3895bba4867e88cadabdb296e11da6cd8374e81</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_socket_set_tlsfiles</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>ae5d76c52ce040fb833a5b5cfccf77dd2</anchor>
- <arglist>(tnet_socket_tls_t *socket, int isClient, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_socket_t *</type>
- <name>tnet_socket_create_2</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>ga8ef4f4ef1882fb31a2db42c4ff0f6b3f</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, tsk_bool_t nonblocking, tsk_bool_t bindsocket)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_socket_t *</type>
- <name>tnet_socket_create</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>ga44cfc3407bc375c5b932bfe45a9de849</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_socket_def_t</name>
- <anchorfile>tnet__socket_8h.html</anchorfile>
- <anchor>a1c58ffbcdb15d377d4075335ea8001a3</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_transport.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__transport_8c</filename>
- <includes id="tnet__transport_8h" name="tnet_transport.h" local="yes" imported="no">tnet_transport.h</includes>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_prepare</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>aafdc2431c02385e300c520ca985ed55b</anchor>
- <arglist>(tnet_transport_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_unprepare</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a9763a05c45da16d31e3c99a79fdf1761</anchor>
- <arglist>(tnet_transport_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>void *</type>
- <name>tnet_transport_mainthread</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>aa0f52495c58646abe52c80f94fac9fb5</anchor>
- <arglist>(void *param)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_stop</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a4dc920abb12866b5154692fa31885d99</anchor>
- <arglist>(tnet_transport_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>tnet_transport_t *</type>
- <name>tnet_transport_create</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a395c18a684a068680a8a1d33fe2e05b7</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, const char *description)</arglist>
- </member>
- <member kind="function">
- <type>tnet_transport_event_t *</type>
- <name>tnet_transport_event_create</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a14597eb136e537f1d4d4e5ce3b884b63</anchor>
- <arglist>(tnet_transport_event_type_t type, const void *callback_data, tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_start</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a505614c61dd978a668d82b827727e086</anchor>
- <arglist>(tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_issecure</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a9b7747658fa19bf00991b51e300f38aa</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_transport_get_description</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a47a6418d80182973b2a1d590a3121bca</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_get_ip_n_port</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a47145a97b9d61dd54920479755addda6</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_get_ip_n_port_2</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>aaaabe13c957df654256b2e9ea31e9b10</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_set_natt_ctx</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a5e2f170d3cdb1d161a7be4225b9d2c2e</anchor>
- <arglist>(tnet_transport_handle_t *handle, tnet_nat_context_handle_t *natt_ctx)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_get_public_ip_n_port</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>adaa653753ccbf3a5c9bfb0ea26cfb985</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>tnet_socket_type_t</type>
- <name>tnet_transport_get_type</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>ab5732e5c7845d6cb39cdda33bc347dd3</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>tnet_fd_t</type>
- <name>tnet_transport_get_master_fd</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>aa745da0b969e4f7fe05884929b331fb8</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>tnet_fd_t</type>
- <name>tnet_transport_connectto</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a4199eaa8e910079521330730e8faefb4</anchor>
- <arglist>(const tnet_transport_handle_t *handle, const char *host, tnet_port_t port, tnet_socket_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_set_callback</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>adebb516df3a574bf4192ceea1060febe</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_transport_cb_f callback, const void *callback_data)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_shutdown</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a89e04cc29fbf6f856055e092c54cd9ea</anchor>
- <arglist>(tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_transport_def_t</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>add6f857e2ce9fa399da32f65d9c6ed42</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_transport_event_def_t</name>
- <anchorfile>tnet__transport_8c.html</anchorfile>
- <anchor>a537e63cab92a28745e37c389813a5812</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_transport.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__transport_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <includes id="tnet__nat_8h" name="tnet_nat.h" local="yes" imported="no">tnet_nat.h</includes>
- <class kind="struct">tnet_transport_event_s</class>
- <class kind="struct">tnet_transport_s</class>
- <member kind="define">
- <type>#define</type>
- <name>DGRAM_MAX_SIZE</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a303845dce0d691a1fd531da3a49b815d</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>STREAM_MAX_SIZE</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a0022d825df5d3de6c3a1bd74f76030ad</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TRANSPORT_CB_F</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>ad21c17552c1931c2326fa1febacdd2af</anchor>
- <arglist>(callback)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_transport_connectto_2</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>aed1a2d620b05906167e9f59f20d249fd</anchor>
- <arglist>(handle, host, port)</arglist>
- </member>
- <member kind="typedef">
- <type>void</type>
- <name>tnet_transport_handle_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a5c5148c35787a35dabdc83e71b6337c9</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_transport_event_type_e</type>
- <name>tnet_transport_event_type_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>acdbc1d61b4bdd46f3d5cb8db8e077397</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_transport_event_s</type>
- <name>tnet_transport_event_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a093af931f4723f331238a2be0a8f5d71</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>int(*</type>
- <name>tnet_transport_cb_f</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>af1e810a07af093bdd8b84528a906cef2</anchor>
- <arglist>)(const tnet_transport_event_t *e)</arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_transport_s</type>
- <name>tnet_transport_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>ab8f9d63467d6c16f5d9e8400705f46f3</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_transport_event_type_e</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>abbf94f6cbb0048f5f737fb0fb850ab5b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>event_data</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>abbf94f6cbb0048f5f737fb0fb850ab5ba8f94c6e260626ca15997e0384a6a34f1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>event_closed</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>abbf94f6cbb0048f5f737fb0fb850ab5baabebea7f92e558c8e09fe1f79b434c1c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>event_error</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>abbf94f6cbb0048f5f737fb0fb850ab5babf46e68136f9cb4d34130283a775a202</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>event_connected</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>abbf94f6cbb0048f5f737fb0fb850ab5ba56ba0a0c0f79ca66025f8a32c28a9b44</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>event_accepted</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>abbf94f6cbb0048f5f737fb0fb850ab5bad931ba02a9181775756c4e40d9e540bc</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_start</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a2a387a33860dee5a55a31ee1ba3997cf</anchor>
- <arglist>(tnet_transport_handle_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_issecure</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>ae297b8dcbd3f82f3e51335ef1c542659</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API const char *</type>
- <name>tnet_transport_get_description</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>aa1964324e317dcc38893c6ad482b4e6e</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_get_ip_n_port</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>aa5a9608d24db9099a6511224fd3471c4</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_get_ip_n_port_2</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>ae6d44bddc3ef0e6d04f64eaaf1e222bd</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_set_natt_ctx</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a220be41b652653fbe3a0724f0091ea29</anchor>
- <arglist>(tnet_transport_handle_t *handle, tnet_nat_context_handle_t *natt_ctx)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_get_public_ip_n_port</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a1c466c2c9934b0a1291c11a9e0dd423a</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_isconnected</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a38e55eab24973fbb9a44062e51d1df75</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_have_socket</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a2fe2a1b3010b9863f70be84209d85e8b</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API const tnet_tls_socket_handle_t *</type>
- <name>tnet_transport_get_tlshandle</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a086def0ecfd39c41becf8ce271602477</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_add_socket</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a63ed1107c44c1301c0bb8b76e1a4f0f0</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_socket_type_t type, tsk_bool_t take_ownership, tsk_bool_t isClient)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_pause_socket</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a5d8f7a60ac7d836e8167195a62fa1151</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tsk_bool_t pause)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_remove_socket</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a0f4b9a66fce9e219c2d61cffeda27ab4</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t *fd)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_fd_t</type>
- <name>tnet_transport_connectto</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>aa262527a36bd4651a46edfdbe837487b</anchor>
- <arglist>(const tnet_transport_handle_t *handle, const char *host, tnet_port_t port, tnet_socket_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tsk_size_t</type>
- <name>tnet_transport_send</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>aa50503da55477a13caffc15d75e0dbf3</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t from, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tsk_size_t</type>
- <name>tnet_transport_sendto</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>aa4a559c780cb647d80d3345e0598930a</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t from, const struct sockaddr *to, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_set_callback</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a30977582f872b66ea7a3f3175853b1cc</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_transport_cb_f callback, const void *callback_data)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_socket_type_t</type>
- <name>tnet_transport_get_type</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a33ffcdc497c1550202731abaaf05b8ab</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_fd_t</type>
- <name>tnet_transport_get_master_fd</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a93691e2da74102b4814817aa997b3b67</anchor>
- <arglist>(const tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_transport_shutdown</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a79a3f3604ec1cb059c8b2d319d163e87</anchor>
- <arglist>(tnet_transport_handle_t *handle)</arglist>
- </member>
- <member kind="function">
- <type>tsk_object_t *</type>
- <name>tnet_transport_context_create</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a158a59ec9e717cbbab586e299e4cd866</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_transport_t *</type>
- <name>tnet_transport_create</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a7b5874cdbc14ee5107151244857bfbd1</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, const char *description)</arglist>
- </member>
- <member kind="function">
- <type>tnet_transport_event_t *</type>
- <name>tnet_transport_event_create</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a14597eb136e537f1d4d4e5ce3b884b63</anchor>
- <arglist>(tnet_transport_event_type_t type, const void *callback_data, tnet_fd_t fd)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_transport_def_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>a9828b22dcbec0f1c54ededd31fd39490</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_transport_event_def_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>afb173e3ef8b21f78740052af526e69f3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_transport_context_def_t</name>
- <anchorfile>tnet__transport_8h.html</anchorfile>
- <anchor>acfd90b5ed268b13b24f377992954d065</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_transport_poll.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__transport__poll_8c</filename>
- <includes id="tnet__transport_8h" name="tnet_transport.h" local="yes" imported="no">tnet_transport.h</includes>
- <includes id="tnet__poll_8h" name="tnet_poll.h" local="yes" imported="no">tnet_poll.h</includes>
- <class kind="struct">transport_socket_s</class>
- <class kind="struct">transport_context_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_MAX_FDS</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>ab595569dcdfe305f64325ba97f281e0a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct transport_socket_s</type>
- <name>transport_socket_t</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a08a9ed901600f39b2f3328c467207d1d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct transport_context_s</type>
- <name>transport_context_t</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a10d522707b2ee648d4331063b8c28f8c</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_add_socket</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a0847dd024cdee818f9d37a379109173e</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tnet_socket_type_t type, tsk_bool_t take_ownership, tsk_bool_t isClient)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_pause_socket</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>abee7c4939d6d6a491a7e858bebb062f3</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd, tsk_bool_t pause)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_remove_socket</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a24be6b8d861a0393ee2ac260fb51b097</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t *fd)</arglist>
- </member>
- <member kind="function">
- <type>tsk_size_t</type>
- <name>tnet_transport_send</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a43742bc0a130d55441289926632bf36b</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t from, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>tsk_size_t</type>
- <name>tnet_transport_sendto</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a1e30780dd04f1c416c54a108ae4d798b</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t from, const struct sockaddr *to, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_have_socket</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>ac47b0cfa0ce85266af579858b378ba54</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_tls_socket_handle_t *</type>
- <name>tnet_transport_get_tlshandle</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a9ba3e1ebd5a3cbd7738d797cbbca99ca</anchor>
- <arglist>(const tnet_transport_handle_t *handle, tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_stop</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a4dc920abb12866b5154692fa31885d99</anchor>
- <arglist>(tnet_transport_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_prepare</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>aafdc2431c02385e300c520ca985ed55b</anchor>
- <arglist>(tnet_transport_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_transport_unprepare</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>a9763a05c45da16d31e3c99a79fdf1761</anchor>
- <arglist>(tnet_transport_t *transport)</arglist>
- </member>
- <member kind="function">
- <type>void *</type>
- <name>tnet_transport_mainthread</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>aa0f52495c58646abe52c80f94fac9fb5</anchor>
- <arglist>(void *param)</arglist>
- </member>
- <member kind="function">
- <type>void *</type>
- <name>tnet_transport_context_create</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>af40659e3fb5b3f051cf897661b7dbe48</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_transport_context_def_t</name>
- <anchorfile>tnet__transport__poll_8c.html</anchorfile>
- <anchor>aae4fa389e5278f1952717f39121e1198</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_transport_win32.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__transport__win32_8c</filename>
- <includes id="tnet__transport_8h" name="tnet_transport.h" local="yes" imported="no">tnet_transport.h</includes>
- </compound>
- <compound kind="file">
- <name>tnet_types.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__types_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <member kind="define">
- <type>#define</type>
- <name>TNET_INVALID_SOCKET</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a6f5bbd2094794d14c754526899ed3555</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_ERROR_WOULDBLOCK</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a6b07aaef86d309e376f2b84c8e47371d</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_ERROR_INPROGRESS</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a6ea526bb93648fb77f7c4c64663c9768</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_ERROR_CONNRESET</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a7c721d5339257e316df23f5d72da8061</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_ERROR_INTR</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>ab678436a332c2e2da1c3036bd0fda68c</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_ERROR_ISCONN</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a2e226a2261679abd9369fe7df869953e</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_ERROR_EAGAIN</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>afd4439f649d80deea1da5ba4b9f407ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_gai_strerror</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>aabe506ad80551db8d5687e48afaa3d3e</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_INVALID_FD</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a78ffc6813a665347c56c3dbc2b59e084</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>uint16_t</type>
- <name>tnet_port_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a3a4edd243b59f5b9e3b0a2bfaa74fcd0</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>int32_t</type>
- <name>tnet_family_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a7e6c5c9f3462512e8093438daf3f4d3b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>char</type>
- <name>tnet_host_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a0e365398826bc67ee809d5d8619cff6f</anchor>
- <arglist>[NI_MAXHOST]</arglist>
- </member>
- <member kind="typedef">
- <type>char</type>
- <name>tnet_ip_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a317920febe452aa28432d0df4d448694</anchor>
- <arglist>[INET6_ADDRSTRLEN]</arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_interfaces_L_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a08fde7fadc3d2f2f5a654ebe5d51c5d9</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_addresses_L_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>af5b5e78f9d75c00cbff4aabee7d4e534</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>char</type>
- <name>tnet_error_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a79e339c2bb6c0e841bce06c380c6d376</anchor>
- <arglist>[512]</arglist>
- </member>
- <member kind="variable">
- <type>TNET_BEGIN_DECLS typedef int32_t</type>
- <name>tnet_fd_t</name>
- <anchorfile>tnet__types_8h.html</anchorfile>
- <anchor>a5e5fc8afe000507a7161007cb7eed1f8</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_utils.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__utils_8c</filename>
- <includes id="tnet__utils_8h" name="tnet_utils.h" local="yes" imported="no">tnet_utils.h</includes>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <includes id="tnet__endianness_8h" name="tnet_endianness.h" local="yes" imported="no">tnet_endianness.h</includes>
- <includes id="tnet__dns__resolvconf_8h" name="tnet_dns_resolvconf.h" local="yes" imported="no">dns/tnet_dns_resolvconf.h</includes>
- <member kind="function">
- <type>tnet_interface_t *</type>
- <name>tnet_interface_create</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga519d8f6f2415bdf328e364f61bb47a39</anchor>
- <arglist>(const char *description, const void *mac_address, tsk_size_t mac_address_length)</arglist>
- </member>
- <member kind="function">
- <type>tnet_address_t *</type>
- <name>tnet_address_create</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga3e826cd2939bd297a73802b860262003</anchor>
- <arglist>(const char *ip)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_getlasterror</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac2b13fc342bfffa18868d8d91596961f</anchor>
- <arglist>(tnet_error_t *error)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_geterrno</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaf5def7b9d46329d20e8939a98482603f</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_interfaces_L_t *</type>
- <name>tnet_get_interfaces</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad982a81d6170a3e4826180ff72efe5fe</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_addresses_L_t *</type>
- <name>tnet_get_addresses</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gab6d29eedac011432c6f370a0de3c08ce</anchor>
- <arglist>(tnet_family_t family, unsigned unicast, unsigned anycast, unsigned multicast, unsigned dnsserver, long if_index)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_getbestsource</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac336e82f244c99e56b440b3b55c60c6a</anchor>
- <arglist>(const char *destination, tnet_port_t port, tnet_socket_type_t type, tnet_ip_t *source)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_getaddrinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga36ace730e3924849994ea87548d495be</anchor>
- <arglist>(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_freeaddrinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga18b2d2888f220d3117ee3b681c464922</anchor>
- <arglist>(struct addrinfo *ai)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_sockaddr</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad10141d545cb251fbae028cb42fd0e03</anchor>
- <arglist>(tnet_fd_t fd, struct sockaddr_storage *result)</arglist>
- </member>
- <member kind="function">
- <type>tnet_socket_type_t</type>
- <name>tnet_get_socket_type</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac13e28b8f1c767306245bd3bf13f5e3c</anchor>
- <arglist>(tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>tnet_family_t</type>
- <name>tnet_get_family</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga00003bf6a8749b31d4b60b09cf5337a3</anchor>
- <arglist>(const char *host, tnet_port_t port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_sockip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga05c917e9faa055994c0cfdf3e49b135a</anchor>
- <arglist>(struct sockaddr *addr, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_peerip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga9a18f5ae763f323f38200e11b9ba369d</anchor>
- <arglist>(tnet_fd_t localFD, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_ip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga159fab1a9ef12230e9100b56c1470f17</anchor>
- <arglist>(tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_getnameinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga043fd7c4105a0d2014f3e0670b888d94</anchor>
- <arglist>(const struct sockaddr *sa, socklen_t salen, char *node, socklen_t nodelen, char *service, socklen_t servicelen, int flags)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_gethostname</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga906ade6f28556babf47cb08dc947abd1</anchor>
- <arglist>(tnet_host_t *result)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_waitUntil</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga3365d143e90fc4a1f83d330f489feb08</anchor>
- <arglist>(tnet_fd_t fd, long timeout, tsk_bool_t writable)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_joingroup6</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga39276ddf27fe08518cf2431ae46a2045</anchor>
- <arglist>(tnet_fd_t fd, const char *multiaddr, unsigned iface_index)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_leavegroup6</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaf54873a5fed045c9eff1200ebb368266</anchor>
- <arglist>(tnet_fd_t fd, const char *multiaddr, unsigned iface_index)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockaddrinfo_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaeb05ffebc3d308fd2ebb39de546c70a5</anchor>
- <arglist>(const char *host, tnet_port_t port, enum tnet_socket_type_e type, struct sockaddr_storage *ai_addr, int *ai_family, int *ai_socktype, int *ai_protocol)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockaddr_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga0449294a58b8db4f81d835af2a535b90</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *addr)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga02e3ba851395a9688b964cc228b732a8</anchor>
- <arglist>(const char *host, tnet_port_t port, enum tnet_socket_type_e type, tnet_fd_t *fd)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_set_mode</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gab9616a14cc2c468ad99b510e276abac0</anchor>
- <arglist>(tnet_fd_t fd, int nonBlocking)</arglist>
- </member>
- <member kind="function">
- <type>tnet_tls_socket_handle_t *</type>
- <name>tnet_sockfd_set_tlsfiles</name>
- <anchorfile>tnet__utils_8c.html</anchorfile>
- <anchor>ab90dfecaa2b9e83a0c550f053302f89f</anchor>
- <arglist>(tnet_fd_t fd, int isClient, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_sendto</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga92fcf0392c9a93e2e578578479d4f35e</anchor>
- <arglist>(tnet_fd_t fd, const struct sockaddr *to, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_recvfrom</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gabbf0cddd16af300a66d0859ed79b3cda</anchor>
- <arglist>(tnet_fd_t fd, void *buf, tsk_size_t size, int flags, struct sockaddr *from)</arglist>
- </member>
- <member kind="function">
- <type>tsk_size_t</type>
- <name>tnet_sockfd_send</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga93356b04edf02a163bfaa421676f1efc</anchor>
- <arglist>(tnet_fd_t fd, const void *buf, tsk_size_t size, int flags)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_recv</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaba9d8246797b995ecfb81f42f1bd1b96</anchor>
- <arglist>(tnet_fd_t fd, void *buf, tsk_size_t size, int flags)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_connectto</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gafe03cf813e644a3d2cd2de8666d7f9c8</anchor>
- <arglist>(tnet_fd_t fd, const struct sockaddr_storage *to)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_listen</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga92a295abbf85a361ee5c609994e21f05</anchor>
- <arglist>(tnet_fd_t fd, int backlog)</arglist>
- </member>
- <member kind="function">
- <type>tnet_fd_t</type>
- <name>tnet_sockfd_accept</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gae4350aa61a296325ce5dfc34fae616f8</anchor>
- <arglist>(tnet_fd_t fd, struct sockaddr *addr, socklen_t *addrlen)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_close</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad13808723477879ca310a70c527d850a</anchor>
- <arglist>(tnet_fd_t *fd)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_interface_def_t</name>
- <anchorfile>tnet__utils_8c.html</anchorfile>
- <anchor>a86ced52797e3eb79032b310357338788</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_address_def_t</name>
- <anchorfile>tnet__utils_8c.html</anchorfile>
- <anchor>a4b41ff43f60511629f506e066fd57565</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_utils.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/</path>
- <filename>tnet__utils_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <class kind="struct">tnet_interface_s</class>
- <class kind="struct">tnet_address_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_CONNECT_TIMEOUT</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga2d7e6e8cff043b7f3c0bda66a7a728bd</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_all</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>ab526869bb2226efadbe9b24fbeaa5bd9</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_all_unicast</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>add37eeae5ab502c5a41b713b52c6fbf4</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_unicast4</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a80c23788d4ee1faa50dd09dabf6b5888</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_unicast6</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a8308f69587e66f13587c758781b1ce06</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_all_anycast</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a320dbd3806f63877741e60fb562a8fdc</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_anycast4</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a38799bb6289ad0204fe2d321c0d88ffc</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_anycast6</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aaa5c0dcb6c4d170162de234d4b39187b</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_all_multicast</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>ac8abdec533160f662824533eec17ae0b</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_multicast4</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a871424099f761764f01125ab50e27cd3</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_multicast6</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a19c1df691b3df50b7dc478cc4d516a6d</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_all_dnsservers</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a81dd24adc37519a2de448759ee44ccaf</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_dnsservers4</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>ab397bc8cc3d0a295c0260703b808fdfa</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_addresses_dnsservers6</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aea0bfe2cc680f63140ac4854136846b9</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_ip</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a5032d56845cd63a0a883ca70fd5117ab</anchor>
- <arglist>(fd, ip)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_port</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a6636348ce754d9ef783a26d552f027c4</anchor>
- <arglist>(fd, port)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_sockip</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a96a295f733a973e755687eb18b76cafc</anchor>
- <arglist>(addr, ip)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_sockport</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aad605b48c4c0b260b8b2eda1ab3b3db4</anchor>
- <arglist>(addr, port)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_peerip</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a079ef23d171be2c33c86d88276749b1d</anchor>
- <arglist>(localFD, ip)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_get_peerport</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aa7f35176e1af1f381db152a4e393c1bc</anchor>
- <arglist>(localFD, port)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_sockfd_waitUntilWritable</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aeed8af0119b20431ad1a7789e61f2256</anchor>
- <arglist>(fd, timeout)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_sockfd_waitUntilReadable</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>abe8fbe85cf4fb5526d8addee586f1714</anchor>
- <arglist>(fd, timeout)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_sockfd_set_nonblocking</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a72e2456a98a5317aad673cdf5b14d229</anchor>
- <arglist>(fd)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_sockfd_set_blocking</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a2840609d8aadb9b0f62be4fbe1b84591</anchor>
- <arglist>(fd)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_PRINT_LAST_ERROR</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>ad84b1312befef0c09d4fa9a37e5bbe60</anchor>
- <arglist>(FMT,...)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>tnet_ioctlt</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>ac2410f7b3e6a9d089408da51ef40bcf8</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_interface_s</type>
- <name>tnet_interface_t</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>a7c49ac3e5325961dd8c430edec84d106</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_address_s</type>
- <name>tnet_address_t</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>abec2d2434c892e0b38503fba6e04d981</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API void</type>
- <name>tnet_getlasterror</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac2b13fc342bfffa18868d8d91596961f</anchor>
- <arglist>(tnet_error_t *error)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_geterrno</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaf5def7b9d46329d20e8939a98482603f</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_interfaces_L_t *</type>
- <name>tnet_get_interfaces</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad982a81d6170a3e4826180ff72efe5fe</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_addresses_L_t *</type>
- <name>tnet_get_addresses</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gab6d29eedac011432c6f370a0de3c08ce</anchor>
- <arglist>(tnet_family_t family, unsigned unicast, unsigned anycast, unsigned multicast, unsigned dnsserver, long if_index)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_getbestsource</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac336e82f244c99e56b440b3b55c60c6a</anchor>
- <arglist>(const char *destination, tnet_port_t port, tnet_socket_type_t type, tnet_ip_t *source)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_getaddrinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga36ace730e3924849994ea87548d495be</anchor>
- <arglist>(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API void</type>
- <name>tnet_freeaddrinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga18b2d2888f220d3117ee3b681c464922</anchor>
- <arglist>(struct addrinfo *ai)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_get_sockaddr</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad10141d545cb251fbae028cb42fd0e03</anchor>
- <arglist>(tnet_fd_t fd, struct sockaddr_storage *result)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_socket_type_t</type>
- <name>tnet_get_socket_type</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac13e28b8f1c767306245bd3bf13f5e3c</anchor>
- <arglist>(tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_family_t</type>
- <name>tnet_get_family</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga00003bf6a8749b31d4b60b09cf5337a3</anchor>
- <arglist>(const char *host, tnet_port_t port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_get_ip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga159fab1a9ef12230e9100b56c1470f17</anchor>
- <arglist>(tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_get_sockip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga05c917e9faa055994c0cfdf3e49b135a</anchor>
- <arglist>(struct sockaddr *addr, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_get_peerip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga9a18f5ae763f323f38200e11b9ba369d</anchor>
- <arglist>(tnet_fd_t localFD, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_getnameinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga043fd7c4105a0d2014f3e0670b888d94</anchor>
- <arglist>(const struct sockaddr *sa, socklen_t salen, char *node, socklen_t nodelen, char *service, socklen_t servicelen, int flags)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_gethostname</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga906ade6f28556babf47cb08dc947abd1</anchor>
- <arglist>(tnet_host_t *result)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_waitUntil</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga3365d143e90fc4a1f83d330f489feb08</anchor>
- <arglist>(tnet_fd_t fd, long timeout, tsk_bool_t writable)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_joingroup6</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga39276ddf27fe08518cf2431ae46a2045</anchor>
- <arglist>(tnet_fd_t fd, const char *multiaddr, unsigned iface_index)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_leavegroup6</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaf54873a5fed045c9eff1200ebb368266</anchor>
- <arglist>(tnet_fd_t fd, const char *multiaddr, unsigned iface_index)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockaddrinfo_init</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>ad61bbea344fdf1113ca96aa8b4d03ecb</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *ai_addr, int *ai_family, int *ai_socktype, int *ai_protocol)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockaddr_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga0449294a58b8db4f81d835af2a535b90</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *addr)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_init</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>adeb40eb2cb1616168082403075e13d51</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, tnet_fd_t *fd)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_set_mode</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gab9616a14cc2c468ad99b510e276abac0</anchor>
- <arglist>(tnet_fd_t fd, int nonBlocking)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_tls_socket_handle_t *</type>
- <name>tnet_sockfd_set_tlsfiles</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aa40b12b2a03fd14f6d5666e6fc31508f</anchor>
- <arglist>(tnet_fd_t fd, int isClient, const char *tlsfile_ca, const char *tlsfile_pvk, const char *tlsfile_pbk)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_sendto</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga92fcf0392c9a93e2e578578479d4f35e</anchor>
- <arglist>(tnet_fd_t fd, const struct sockaddr *to, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_recvfrom</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gabbf0cddd16af300a66d0859ed79b3cda</anchor>
- <arglist>(tnet_fd_t fd, void *buf, tsk_size_t size, int flags, struct sockaddr *from)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tsk_size_t</type>
- <name>tnet_sockfd_send</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga93356b04edf02a163bfaa421676f1efc</anchor>
- <arglist>(tnet_fd_t fd, const void *buf, tsk_size_t size, int flags)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_recv</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaba9d8246797b995ecfb81f42f1bd1b96</anchor>
- <arglist>(tnet_fd_t fd, void *buf, tsk_size_t size, int flags)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_connectto</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gafe03cf813e644a3d2cd2de8666d7f9c8</anchor>
- <arglist>(tnet_fd_t fd, const struct sockaddr_storage *to)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_listen</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga92a295abbf85a361ee5c609994e21f05</anchor>
- <arglist>(tnet_fd_t fd, int backlog)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API tnet_fd_t</type>
- <name>tnet_sockfd_accept</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gae4350aa61a296325ce5dfc34fae616f8</anchor>
- <arglist>(tnet_fd_t fd, struct sockaddr *addr, socklen_t *addrlen)</arglist>
- </member>
- <member kind="function">
- <type>TINYNET_API int</type>
- <name>tnet_sockfd_close</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad13808723477879ca310a70c527d850a</anchor>
- <arglist>(tnet_fd_t *fd)</arglist>
- </member>
- <member kind="function">
- <type>tnet_interface_t *</type>
- <name>tnet_interface_create</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga519d8f6f2415bdf328e364f61bb47a39</anchor>
- <arglist>(const char *description, const void *mac_address, tsk_size_t mac_address_length)</arglist>
- </member>
- <member kind="function">
- <type>tnet_address_t *</type>
- <name>tnet_address_create</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga3e826cd2939bd297a73802b860262003</anchor>
- <arglist>(const char *ip)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_interface_def_t</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>aa481fcf4bb5fab0c6027398b3910e409</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_address_def_t</name>
- <anchorfile>tnet__utils_8h.html</anchorfile>
- <anchor>acc7cf74fd6b2d76973dd6dad9cfabe33</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_turn.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/turn/</path>
- <filename>tnet__turn_8c</filename>
- <includes id="tnet__turn_8h" name="tnet_turn.h" local="yes" imported="no">tnet_turn.h</includes>
- <includes id="tnet__turn__message_8h" name="tnet_turn_message.h" local="yes" imported="no">tnet_turn_message.h</includes>
- <member kind="typedef">
- <type>tnet_stun_request_t *(*</type>
- <name>tnet_turn_create_request_func</name>
- <anchorfile>tnet__turn_8c.html</anchorfile>
- <anchor>a381f4d2195b9e8be75743e8e5561cc92</anchor>
- <arglist>)(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_t *</type>
- <name>tnet_turn_channel_binding_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga103e23a60bb64dd069e6ab091784a6d4</anchor>
- <arglist>(const tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_permission_t *</type>
- <name>tnet_turn_permission_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8b42fc6a1e3f09cef7c7bf7c681a8218</anchor>
- <arglist>(uint32_t timeout)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_t *</type>
- <name>tnet_turn_allocation_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8ab0618c59d331267df779a881eb5bab</anchor>
- <arglist>(tnet_fd_t fd, tnet_socket_type_t socket_type, const char *server_address, tnet_port_t server_port, const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaddc8b26510c425a60140d25f131dcb85</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, tnet_stun_message_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_allocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae1e001971df0be2311a06976e2f33201</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga2fde61ef85bcab916a3c9ce62789bd7e</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_unallocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga54c0fc2d0586f3160ab4f804c8a3950e</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_channel_bind</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gacca17b6face01e3f046e75f0624545eb</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_channel_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga86f4cd5cd926f84b75a3f8c86bcc348f</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_sendindication</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga346d00b42c27cb7f9a367d790137a351</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_permission</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gad8ed3de2531edf3185d41109d9411f2b</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_send_request</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaae576cf98cdc0ef40b0b3361327ad9cf</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, tnet_turn_create_request_func funcptr,...)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_id_t</type>
- <name>tnet_turn_allocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gad66c1ecb8963678e0d8451fef43eafd0</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, const tnet_fd_t localFD, tnet_socket_type_t socket_type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_allocation_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8f8e9c71f4fcbddc9a95e7cf0ce333a6</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_unallocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gadfec48a9b5519234d73373a46b24606e</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_id_t</type>
- <name>tnet_turn_channel_bind</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga3e6e2ae486927450c8a32d3000dd0e85</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_turn_allocation_t *allocation, struct sockaddr_storage *peer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_channel_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga39d90117f000959af24720570c240b75</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_turn_channel_binding_t *channel_bind)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_channel_senddata</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8623d3c7fec8d357ad29f76633643109</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_turn_channel_binding_t *channel_bind, const void *data, tsk_size_t size, int indication)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_add_permission</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gad49bc0f0bdd9832cf210825cc0b2156d</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_turn_allocation_t *allocation, const char *ipaddress, uint32_t timeout)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_channel_binding_def_t</name>
- <anchorfile>tnet__turn_8c.html</anchorfile>
- <anchor>a8c96cc1e81b39329d57e913cf3a22ab7</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_permission_def_t</name>
- <anchorfile>tnet__turn_8c.html</anchorfile>
- <anchor>ac2c37805caacd556fb6b9e32b817e635</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_allocation_def_t</name>
- <anchorfile>tnet__turn_8c.html</anchorfile>
- <anchor>a9edbc36c8c4f6a56c71a5a00e98f9719</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_turn.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/turn/</path>
- <filename>tnet__turn_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__turn__attribute_8h" name="tnet_turn_attribute.h" local="yes" imported="no">turn/tnet_turn_attribute.h</includes>
- <includes id="tnet__proto_8h" name="tnet_proto.h" local="yes" imported="no">tnet_proto.h</includes>
- <includes id="tnet__socket_8h" name="tnet_socket.h" local="yes" imported="no">tnet_socket.h</includes>
- <includes id="tnet__types_8h" name="tnet_types.h" local="yes" imported="no">tnet_types.h</includes>
- <class kind="struct">tnet_turn_permission_s</class>
- <class kind="struct">tnet_turn_channel_binding_s</class>
- <class kind="struct">tnet_turn_allocation_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_PERMISSION_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae355f01c55abfcddc5e24b59acc170f6</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_CHANBIND_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8aa082bcb28e67d8ec00e95b2fe5406f</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_INVALID_ALLOCATION_ID</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a52d97a7fd715a0dc770ad8afe885e50f</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_IS_VALID_ALLOCATION_ID</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a84362f7b61f67dc1f3a2543078e74bdd</anchor>
- <arglist>(id)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_INVALID_CHANNEL_BINDING_ID</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a23d5f1efb08ac449cc9e3d1ef859711e</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_IS_VALID_CHANNEL_BINDING_ID</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a491748f8fbd7476bbd33b4ba678dc0de</anchor>
- <arglist>(id)</arglist>
- </member>
- <member kind="typedef">
- <type>uint64_t</type>
- <name>tnet_turn_allocation_id_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a78fc33b60d08b8c6c4480d855f98051b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>uint16_t</type>
- <name>tnet_turn_channel_binding_id_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a613a5cdd5a850369c7b547934ae6c544</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_permission_s</type>
- <name>tnet_turn_permission_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga022e47cd11dd0cd6b5985948e4f47421</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_turn_permissions_L_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>ae6574d0d25b43a7f1655d073c086d9d5</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_channel_binding_s</type>
- <name>tnet_turn_channel_binding_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga869e95eb9bf494895d66ad7a68f39cd1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_turn_channel_bindings_L_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a08a04f2fc0fd1f5db142d37ee61ffff8</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_allocation_s</type>
- <name>tnet_turn_allocation_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga4962ff19fd67702f01a1b1c107b19a56</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_turn_allocations_L_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>af966c78dcc79a47d86636c5710180663</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_id_t</type>
- <name>tnet_turn_allocate</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a06d72656df436b315bbab5299e7947f1</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_fd_t localFD, tnet_socket_type_t socket_type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_allocation_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8f8e9c71f4fcbddc9a95e7cf0ce333a6</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_unallocate</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>ab7b1b333af35a2367821c41793d745eb</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_id_t</type>
- <name>tnet_turn_channel_bind</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>aca13f95e34db4a637194a013b7ef594c</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_turn_allocation_t *allocation, struct sockaddr_storage *peer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_channel_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga39d90117f000959af24720570c240b75</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_turn_channel_binding_t *channel_bind)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_channel_senddata</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8623d3c7fec8d357ad29f76633643109</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_turn_channel_binding_t *channel_bind, const void *data, tsk_size_t size, int indication)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_add_permission</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a41d5b5a2d4e282954b8503a1dcf14ba8</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_turn_allocation_t *allocation, const char *ipaddress, uint32_t timeout)</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_permission_def_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a82139781df85506bc0fafe0f03f3e215</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_channel_binding_def_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>ae45bdb387bc5636788b75b2f8e7670af</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_allocation_def_t</name>
- <anchorfile>tnet__turn_8h.html</anchorfile>
- <anchor>a9f3b2fc224b7da612fef43c5df6ecee4</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_turn_attribute.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/turn/</path>
- <filename>tnet__turn__attribute_8c</filename>
- <includes id="tnet__turn__attribute_8h" name="tnet_turn_attribute.h" local="yes" imported="no">tnet_turn_attribute.h</includes>
- <member kind="function">
- <type>tnet_turn_attribute_channelnum_t *</type>
- <name>tnet_turn_attribute_channelnum_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga407a64bdadf74e0cc58808f2f16de2fd</anchor>
- <arglist>(uint16_t number)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_lifetime_t *</type>
- <name>tnet_turn_attribute_lifetime_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga97892194ee263338e36c11d02d3c5ea2</anchor>
- <arglist>(uint32_t lifetime)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaf66bebd5bd8319c454a450dc092973c5</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_create_null</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>afebd53010c1edb07cbe663cee6aaaf50</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_data_t *</type>
- <name>tnet_turn_attribute_data_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga6e749efbc0e6c2d181b7b5572dd4a84a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xrelayed_addr_t *</type>
- <name>tnet_turn_attribute_xrelayed_addr_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga27dd53bb4f5afd8fbe1b3c6450764d68</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_even_port_t *</type>
- <name>tnet_turn_attribute_even_port_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga9201f3b08080e3d9d73d91cce22fdb6b</anchor>
- <arglist>(unsigned R)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_reqtrans_t *</type>
- <name>tnet_turn_attribute_reqtrans_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga0f8e1e1c00b3c62c9c451ad2dbf8419e</anchor>
- <arglist>(tnet_proto_t protocol)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_dontfrag_t *</type>
- <name>tnet_turn_attribute_dontfrag_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gab1baec0bd9b214f816737ccaf36846a7</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_restoken_t *</type>
- <name>tnet_turn_attribute_restoken_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga498409f84c06d567eeeeb913b01117c8</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_turn_attribute_deserialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae0fac81dd69579c064501d497cd03ea8</anchor>
- <arglist>(tnet_stun_attribute_type_t type, uint16_t length, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_attribute_serialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga5c64288790f379c04d8aae14117e305c</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_channelnum_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a72f2fd30ca18baf219d74649601c1aad</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_lifetime_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a60a2ffe2a549923f8a5ea6c778005fa8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a99670a5af5f3a8ed7fd4efad17408487</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_data_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a4aabd9e2dbe97cb3be22393bfd7a5c22</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_xrelayed_addr_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a79af40ee574c272240e82525ffe3ad27</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_even_port_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a048a8a7f4c325d410b81ff93868f91a7</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_reqtrans_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>ad5b4ff0b5c890a8d80ebd7488980f6a3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_dontfrag_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a59bb091518a3d8acb50372f498441daf</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_restoken_def_t</name>
- <anchorfile>tnet__turn__attribute_8c.html</anchorfile>
- <anchor>a28eb707dbdbb91a8a63f112d6046d27c</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_turn_attribute.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/turn/</path>
- <filename>tnet__turn__attribute_8h</filename>
- <includes id="tinynet__config_8h" name="tinynet_config.h" local="yes" imported="no">tinynet_config.h</includes>
- <includes id="tnet__proto_8h" name="tnet_proto.h" local="yes" imported="no">tnet_proto.h</includes>
- <includes id="tnet__stun__attribute_8h" name="tnet_stun_attribute.h" local="yes" imported="no">stun/tnet_stun_attribute.h</includes>
- <class kind="struct">tnet_turn_attribute_channelnum_s</class>
- <class kind="struct">tnet_turn_attribute_lifetime_s</class>
- <class kind="struct">tnet_turn_attribute_xpeer_addr_s</class>
- <class kind="struct">tnet_turn_attribute_data_s</class>
- <class kind="struct">tnet_turn_attribute_xrelayed_addr_s</class>
- <class kind="struct">tnet_turn_attribute_even_port_s</class>
- <class kind="struct">tnet_turn_attribute_reqtrans_s</class>
- <class kind="struct">tnet_turn_attribute_dontfrag_s</class>
- <class kind="struct">tnet_turn_attribute_restoken_s</class>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_channelnum_s</type>
- <name>tnet_turn_attribute_channelnum_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaa77bcb197c9e99794d67fd934d8c50c1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_lifetime_s</type>
- <name>tnet_turn_attribute_lifetime_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga26a916f263289acaad0a56b7e374d028</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_xpeer_addr_s</type>
- <name>tnet_turn_attribute_xpeer_addr_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaa7fa88cb2c5f7269b94a916b66083235</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_data_s</type>
- <name>tnet_turn_attribute_data_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaaeab89d23a21fcfdaec9920fea7af597</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_xrelayed_addr_s</type>
- <name>tnet_turn_attribute_xrelayed_addr_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga07d7abdfc37b58ca81964c22a5012e41</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_even_port_s</type>
- <name>tnet_turn_attribute_even_port_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaa895b29c22d94e8cfcad5530a7d3264b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_reqtrans_s</type>
- <name>tnet_turn_attribute_reqtrans_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga2ca2caa07d491a0d562e5b2e456d8f59</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_dontfrag_s</type>
- <name>tnet_turn_attribute_dontfrag_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gab703b2d48941e0a376c5c5d82d0c2b83</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_restoken_s</type>
- <name>tnet_turn_attribute_restoken_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga981d08f23d6a6c2f660e0b8631703093</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_turn_attribute_deserialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae0fac81dd69579c064501d497cd03ea8</anchor>
- <arglist>(tnet_stun_attribute_type_t type, uint16_t length, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_attribute_serialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga5c64288790f379c04d8aae14117e305c</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_channelnum_t *</type>
- <name>tnet_turn_attribute_channelnum_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga407a64bdadf74e0cc58808f2f16de2fd</anchor>
- <arglist>(uint16_t number)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_lifetime_t *</type>
- <name>tnet_turn_attribute_lifetime_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga97892194ee263338e36c11d02d3c5ea2</anchor>
- <arglist>(uint32_t lifetime)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaf66bebd5bd8319c454a450dc092973c5</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_create_null</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>afebd53010c1edb07cbe663cee6aaaf50</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_data_t *</type>
- <name>tnet_turn_attribute_data_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga6e749efbc0e6c2d181b7b5572dd4a84a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xrelayed_addr_t *</type>
- <name>tnet_turn_attribute_xrelayed_addr_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga27dd53bb4f5afd8fbe1b3c6450764d68</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_even_port_t *</type>
- <name>tnet_turn_attribute_even_port_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga9201f3b08080e3d9d73d91cce22fdb6b</anchor>
- <arglist>(unsigned R)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_reqtrans_t *</type>
- <name>tnet_turn_attribute_reqtrans_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga0f8e1e1c00b3c62c9c451ad2dbf8419e</anchor>
- <arglist>(tnet_proto_t protocol)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_dontfrag_t *</type>
- <name>tnet_turn_attribute_dontfrag_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gab1baec0bd9b214f816737ccaf36846a7</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_restoken_t *</type>
- <name>tnet_turn_attribute_restoken_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga498409f84c06d567eeeeb913b01117c8</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="variable">
- <type>TNET_BEGIN_DECLS typedef tnet_stun_attribute_t</type>
- <name>tnet_turn_attribute_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>a00de15de99bdb6cce62f1ae7e326ff33</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_channelnum_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>aa9ccbc071dd9dc40b459e98e329a7b7f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_lifetime_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>ab6683e297789efe2ecb14d7fa617ced3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>a18c5987c8947a764223d1c6479aed130</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_data_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>aa8268a52ec6ea4183cb6cbcc4092a2d6</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_xrelayed_addr_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>a695a13f8c65383eb1fda5d1e0e086cc4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_even_port_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>af8e79d87fc8a281fe70a27b8e4cf6b21</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_reqtrans_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>ace9cf4c1412342af44a6c01127c3c22f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_dontfrag_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>aa25f381fb1d4df9a64231c74163e9ec9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_attribute_restoken_def_t</name>
- <anchorfile>tnet__turn__attribute_8h.html</anchorfile>
- <anchor>a1d2d08c197e85e06c7f3f1abd75b0140</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_turn_message.c</name>
- <path>C:/Projects/Doubango/tinyNET/src/turn/</path>
- <filename>tnet__turn__message_8c</filename>
- <includes id="tnet__turn__message_8h" name="tnet_turn_message.h" local="yes" imported="no">tnet_turn_message.h</includes>
- <member kind="function">
- <type>tnet_turn_channel_data_t *</type>
- <name>tnet_turn_channel_data_create</name>
- <anchorfile>tnet__turn__message_8c.html</anchorfile>
- <anchor>aea95662fe6dbd4eca6e02d1a05ef42b9</anchor>
- <arglist>(uint16_t number, uint16_t length, const void *data)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_data_t *</type>
- <name>tnet_turn_channel_data_create_null</name>
- <anchorfile>tnet__turn__message_8c.html</anchorfile>
- <anchor>aed557f9b1a06efc770b67fe6633b4373</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_turn_channel_data_serialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga00439f15cae25f78c4fd515c2ad689fc</anchor>
- <arglist>(const tnet_turn_channel_data_t *message)</arglist>
- </member>
- <member kind="variable">
- <type>const tsk_object_def_t *</type>
- <name>tnet_turn_channel_data_def_t</name>
- <anchorfile>tnet__turn__message_8c.html</anchorfile>
- <anchor>ac5ac4021323667d38b4d942a391da23c</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="file">
- <name>tnet_turn_message.h</name>
- <path>C:/Projects/Doubango/tinyNET/src/turn/</path>
- <filename>tnet__turn__message_8h</filename>
- <class kind="struct">tnet_turn_channel_data_s</class>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_turn_channel_data_s</type>
- <name>tnet_turn_channel_data_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga4878f9790955d14d532e4de51ac0fa5f</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_turn_channel_data_serialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga00439f15cae25f78c4fd515c2ad689fc</anchor>
- <arglist>(const tnet_turn_channel_data_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_data_t *</type>
- <name>tnet_turn_channel_data_create</name>
- <anchorfile>tnet__turn__message_8h.html</anchorfile>
- <anchor>aea95662fe6dbd4eca6e02d1a05ef42b9</anchor>
- <arglist>(uint16_t number, uint16_t length, const void *data)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_data_t *</type>
- <name>tnet_turn_channel_data_create_null</name>
- <anchorfile>tnet__turn__message_8h.html</anchorfile>
- <anchor>aed557f9b1a06efc770b67fe6633b4373</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="variable">
- <type>TINYNET_GEXTERN const tsk_object_def_t *</type>
- <name>tnet_turn_channel_data_def_t</name>
- <anchorfile>tnet__turn__message_8h.html</anchorfile>
- <anchor>a52e135f0633a3a35dc8726b093b86ef9</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_dhcp_group</name>
- <title>DHCPv4/BOOTP (RFC 2131) implementation.</title>
- <filename>group__tnet__dhcp__group.html</filename>
- <class kind="struct">tnet_dhcp_params_s</class>
- <class kind="struct">tnet_dhcp_ctx_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga4c4d364928ec9c9b7c2dbc6d59187b94</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_CLIENT_PORT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga40d19eada507a56dd275125e3b1c195c</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_SERVER_PORT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>gae5229a21da05427c690040fa34a6a2b3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_VENDOR_ID_DEFAULT</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga68fdef222cf61845b6d961766b4cf276</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MAX_CODES</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga2e7d7c17df6e0c697014a20ab344d1a8</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DHCP_MAX_MSG_SIZE</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga9489b2e11946fde982adc9f88a148e5c</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_params_s</type>
- <name>tnet_dhcp_params_t</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga6fc1dfe6651b6c630b32fb6744a269e9</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_dhcp_ctx_s</type>
- <name>tnet_dhcp_ctx_t</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>gab40673583cd866001d0afc7db3e01e59</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_ctx_t *</type>
- <name>tnet_dhcp_ctx_create</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga4047baa7341d04b728d5884460214802</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_params_t *</type>
- <name>tnet_dhcp_params_create</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga7d73362e75ec846e6ce440ba9178069a</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_reply_t *</type>
- <name>tnet_dhcp_send_request</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>gafd37386ea787357f72a4c71f8f66df4f</anchor>
- <arglist>(tnet_dhcp_ctx_t *ctx, tnet_dhcp_request_t *request)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp_reply_t *</type>
- <name>tnet_dhcp_query</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga66e173bcf5fd24b06a204be44312c56a</anchor>
- <arglist>(tnet_dhcp_ctx_t *ctx, tnet_dhcp_message_type_t type, tnet_dhcp_params_t *params)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dhcp_params_add_code</name>
- <anchorfile>group__tnet__dhcp__group.html</anchorfile>
- <anchor>ga9fb8994c0bb692b29ccd0454cc592bc5</anchor>
- <arglist>(tnet_dhcp_params_t *params, tnet_dhcp_option_code_t code)</arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_dhcp6_group</name>
- <title>DHCPv6 (RFC 3315) implementation.</title>
- <filename>group__tnet__dhcp6__group.html</filename>
- <member kind="function">
- <type>tnet_dhcp6_reply_t *</type>
- <name>tnet_dhcp6_send_request</name>
- <anchorfile>group__tnet__dhcp6__group.html</anchorfile>
- <anchor>gadac4a203c542c67bcd608974944ade8d</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, tnet_dhcp6_request_t *request)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dhcp6_reply_t *</type>
- <name>tnet_dhcp6_requestinfo</name>
- <anchorfile>group__tnet__dhcp6__group.html</anchorfile>
- <anchor>gac8dd99f4e54866bbdf190ce5061b5b3a</anchor>
- <arglist>(const tnet_dhcp6_ctx_t *ctx, const tnet_dhcp6_option_orequest_t *orequest)</arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_dns_group</name>
- <title>DNS utility functions (RFCS [1034 1035] [3401 3402 3403 3404]).</title>
- <filename>group__tnet__dns__group.html</filename>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_CACHE_TTL</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gad0036c81833a0d67783075346183f741</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga27019bac31c0cd87fcf5f1d440d44db2</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_DGRAM_SIZE_DEFAULT</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga3f0a0842a1099131e50c4ce1358a8d66</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_SERVER_PORT_DEFAULT</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga3687b2e64d73b85594bd93a79df252af</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_MESSAGE_IS_RESPONSE</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga2a5cf37ea80a5c81714042074eac92bf</anchor>
- <arglist>(message)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_MESSAGE_IS_QUERY</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaf24bf109d5da866b600989d53c24f2aa</anchor>
- <arglist>(message)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_RESPONSE_IS_SUCCESS</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaefa196185f91151ec1b70542d73f230b</anchor>
- <arglist>(response)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_DNS_RESPONSE_IS_ERROR</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gab7b1d2b4373729da855fad1816ef9e81</anchor>
- <arglist>(response)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_ctx_t *</type>
- <name>tnet_dns_ctx_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga080c974f8f6bdb3779bfae98956e9821</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_cache_entry_t *</type>
- <name>tnet_dns_cache_entry_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga130888ddea8e08e520a2ffd02278d90d</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tnet_dns_response_t *answer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_cache_clear</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga4908f53f564e46f39472e1dc825aa3ce</anchor>
- <arglist>(tnet_dns_ctx_t *ctx)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_resolve</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaaaee535d51058d67d9f170239de354b3</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_enum</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaf08d4dbbaf1025a17613bd553bf4db78</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *e164num, const char *domain)</arglist>
- </member>
- <member kind="function">
- <type>char *</type>
- <name>tnet_dns_enum_2</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga1aa07c721d9e2e7bac6eea9f44a515c8</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *service, const char *e164num, const char *domain)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_query_srv</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gab4b9b4f145decf0d2886c8a4ea25a313</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *service, char **hostname, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_query_naptr_srv</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga0c2c6cdb03f205b6ce16af9398d91730</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *domain, const char *service, char **hostname, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_dns_add_server</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga9d617f0cf0f0dc70e4a3bca53ab23824</anchor>
- <arglist>(tnet_dns_ctx_t *ctx, const char *host)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga98138daa781d9c12a4ba43f3371d0895</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype, tsk_bool_t isquery)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_create_null</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga353b8a830ee67c2a2d2a6e810f081ea9</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_response_t *</type>
- <name>tnet_dns_response_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gaca11f63942b2ed04516a0d2323c75e7f</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_query_t *</type>
- <name>tnet_dns_query_create</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>gac97c055c0a0a84882eb586feb22ef097</anchor>
- <arglist>(const char *qname, tnet_dns_qclass_t qclass, tnet_dns_qtype_t qtype)</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_dns_message_serialize</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga98f52e21a3d361e2a837993c31756871</anchor>
- <arglist>(const tnet_dns_message_t *message)</arglist>
- </member>
- <member kind="function">
- <type>tnet_dns_message_t *</type>
- <name>tnet_dns_message_deserialize</name>
- <anchorfile>group__tnet__dns__group.html</anchorfile>
- <anchor>ga72d0a558aa990326e3724bd06260ac65</anchor>
- <arglist>(const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_stun_group</name>
- <title>STUN2 (RFC 5389) implementation.</title>
- <filename>group__tnet__stun__group.html</filename>
- <class kind="struct">tnet_stun_binding_s</class>
- <class kind="struct">tnet_stun_attribute_s</class>
- <class kind="struct">tnet_stun_attribute_mapped_addr_s</class>
- <class kind="struct">tnet_stun_attribute_xmapped_addr_s</class>
- <class kind="struct">tnet_stun_attribute_username_s</class>
- <class kind="struct">tnet_stun_attribute_integrity_s</class>
- <class kind="struct">tnet_stun_attribute_fingerprint_s</class>
- <class kind="struct">tnet_stun_attribute_errorcode_s</class>
- <class kind="struct">tnet_stun_attribute_realm_s</class>
- <class kind="struct">tnet_stun_attribute_nonce_s</class>
- <class kind="struct">tnet_stun_attribute_unknowns_s</class>
- <class kind="struct">tnet_stun_attribute_software_s</class>
- <class kind="struct">tnet_stun_attribute_altserver_s</class>
- <class kind="struct">tnet_stun_message_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_INVALID_BINDING_ID</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeb338f5c8a9b3ac08bba78293fdc22d4</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_IS_VALID_BINDING_ID</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga809cd1386eaa84094e78ef17a414ad7d</anchor>
- <arglist>(id)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_TCP_UDP_DEFAULT_PORT</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga840d6af2bf3bd3a96d120c942abefd7a</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_TLS_DEFAULT_PORT</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab0ae6bc64ad691f9bc5bd2b4c88c4569</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_MAGIC_COOKIE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gac5e54e4b4576b54b53d2f4242f3e30de</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_HEADER_SIZE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga1df2b74747811b1bbdad28b18e0d80c3</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_ATTRIBUTE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeec0275bf11e81b2b89c149df5194c51</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_REQUEST</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga09a28b87a49c9242203c09d5fa56a1fe</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_INDICATION</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gac1faf702ec0e6fafd112c3d2b80e1af8</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_SUCCESS</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga98049d686a5db4369a7554a77bf26838</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_RESPONSE_IS_ERROR</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga10bdb77a5f51b4670be89302eb445974</anchor>
- <arglist>(self)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_IS_STUN2</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3b0b84dbb873d8c18c6e438bdf5053e8</anchor>
- <arglist>(PU8)</arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_STUN_TRANSACID_SIZE</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaa796e7b0e870b335336c50024ef5823</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_binding_s</type>
- <name>tnet_stun_binding_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabb378355a46b1aef733acdeef3a38368</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>tsk_list_t</type>
- <name>tnet_stun_bindings_L_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga994b6db4d6ac6e78c4ece450f1d5edff</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_addr_family_e</type>
- <name>tnet_stun_addr_family_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7080ca2a8d2b45a22d21c522a2a5a28f</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_attribute_type_e</type>
- <name>tnet_stun_attribute_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2e77e50a4af676b754191403ae102933</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_s</type>
- <name>tnet_stun_attribute_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3ce2a25dae1324a8dd545a68a2d8ccf3</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_mapped_addr_s</type>
- <name>tnet_stun_attribute_mapped_addr_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga6ef5c5c6d47376dc7cf7ac14b923ad26</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_xmapped_addr_s</type>
- <name>tnet_stun_attribute_xmapped_addr_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8885759ce02dd0bebc0bee97ec48171c</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_username_s</type>
- <name>tnet_stun_attribute_username_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga33d875930c4e6213e7516e580a88eebb</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_integrity_s</type>
- <name>tnet_stun_attribute_integrity_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8b2b266a46e44c471708eca71ac8670a</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_fingerprint_s</type>
- <name>tnet_stun_attribute_fingerprint_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7ead14f441ddf014894c17fcef2feeaf</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_errorcode_s</type>
- <name>tnet_stun_attribute_errorcode_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0e804aae488d73e576dd9c4453a93a04</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_realm_s</type>
- <name>tnet_stun_attribute_realm_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaf4ef4fa43bec46b6313c0c400d6c6ca</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_nonce_s</type>
- <name>tnet_stun_attribute_nonce_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7e4d37384aa42524d68d8e9e0ddc9ea2</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_unknowns_s</type>
- <name>tnet_stun_attribute_unknowns_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab27dd830e06e223350a584c41383015d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_software_s</type>
- <name>tnet_stun_attribute_software_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga5744df35d8bf1f1f366097f6a63f1177</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_attribute_altserver_s</type>
- <name>tnet_stun_attribute_altserver_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga1912ae8bc9ea407a04f1d16aa570dbc9</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>uint8_t</type>
- <name>tnet_stun_transacid_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaab3bfd494f75601a0f26177c6d851810</anchor>
- <arglist>[TNET_STUN_TRANSACID_SIZE]</arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_class_type_e</type>
- <name>tnet_stun_class_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8db95f74a4953795bf182744e63eff78</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_method_type_e</type>
- <name>tnet_stun_method_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga145552721a7b4f524ceb40ac2da1038d</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>enum tnet_stun_message_type_e</type>
- <name>tnet_stun_message_type_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab3ed2f3313ef6914347c2e604d7cf104</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_stun_message_s</type>
- <name>tnet_stun_message_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga4e9470802bdd2d8b0a1b90631369721e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_addr_family_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3326fbcc063f264d3d359e922637e2e4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_ipv4</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3326fbcc063f264d3d359e922637e2e4a5663f4b60301ed2f9e7823613407dbed</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_ipv6</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3326fbcc063f264d3d359e922637e2e4a97e1e424d39a8af2791c1187090f111e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_attribute_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab696586b61219965987af1e017e6ffa6</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reserved</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a5bf34ce06a004ad9f8db1dc687786273</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_mapped_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a9aadc5f8467c936cc7359889ba120e33</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_response_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a203b0a7edf4f8fb3381ac769595a2098</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_change_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6aeb35b7b83152b7a99bf46b4014928adc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_source_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a69f3448100d4f1a61536eb2c7315cd90</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_changed_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a0bd0d2c8f1d6ae85ffb58aeef4c01134</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_username</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a3247970572dad0c63e537b647dbd0861</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_password</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a432698b7b67cf13adf504f969abb60fd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_message_integrity</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ac20851e6e8fd2c479c0438b376987a85</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_error_code</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ab8571c9a5c334530ef9aa45adc7fd71e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_unknown_attributes</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a455d442e5c380953ff11c7e0d055f3ae</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reflected_from</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ae129dfcf945fe995400dba3e8b9895c5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_realm</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a0d8e28c40313d6d3b397ac957714cfee</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_nonce</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ae5dda080590c37e95953334f715ed3ef</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_xor_mapped_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6af70dcad086bff5d4ee77f093941642d2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_software</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ad5a2f9a89fbc825142e4d754b51bc125</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_alternate_server</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a4f263d754aaccf30fd861a934dfc12ba</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_fingerprint</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6aac669613b66507fba6c08d23a4283bf2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channel_number</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a7559421f1d46a400cdda94c32c3aff74</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_lifetime</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6aff4ed6f5e451f77b39d5113b9085493c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reserved2</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a626c6684c81f69c1649e178cc9847069</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_xor_peer_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ae14d3b3903934eab51356ad28584fc66</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_data</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ab85dfed04ff37affea00d10a517c72dd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_xor_relayed_address</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ada0a3d93b81c32a3d0af2ed20efffe71</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_even_port</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6ac99da9ae2b9a6a885631e5e476293df2</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_requested_transport</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a033a9a9cdad515c45291007be25dd028</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_dont_fragment</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a3f854135f19b767abc7e8031af6b5f88</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reserved3</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a57c9e8d7229d0989d73a5efc2fef36e7</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_reservation_token</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggab696586b61219965987af1e017e6ffa6a88373f0f1635103b2091910a9584c58d</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_class_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3faef946079e315842f5ad4d41aa0929</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a4617c080243a43b3d8f93bdfcc3f0f4b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a204a6136670e4ad622276ef22a2ae65e</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a0f27f07bfc9be6aa217799fa088cf059</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_class_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga3faef946079e315842f5ad4d41aa0929a271a1bc249f8bc1af5b9e6308b166232</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_method_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga4701a0e3395592a6d6a742901212801c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_binding</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801cafd301f45e6297ffca65062c30b89ef53</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_allocate</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca166402bfafe37fa33b31f1466265798b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_refresh</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca6081fbd713a271d81264c919a589ce97</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_send</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca3c8e39a747df8f52dcc70d5d7db3e423</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_data</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca72ac38a767b77800980a5577dd13059c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_createpermission</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca45791d8de7420d9d3afccfc78ac8ba8b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_method_channelbind</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gga4701a0e3395592a6d6a742901212801ca9a883e8885d8eb35a93beccda692233c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumeration">
- <name>tnet_stun_message_type_e</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabf2f8d8b846fe491470941a7e237559c</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caef49ee403fb2e849831649e4c09729d4</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca40f5bbd220cf9c1ec50654becc93c75f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca45e30ced8713c5c159bb45641ce04e79</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_binding_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca9526f90725e2c9be01cd4ea2aa818e50</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cab3d8c425c241c43ab3bdbec7fdddc2dd</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cadda6f40f23dc4bd53d1d6c068484ada0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caf20455522d8e72c9e055b8ea5ef2dabb</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_allocate_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cae4d21e386431edf815a9a652f3d745a5</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca3f15b1671e604a2fb7a65401756dccc0</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca5130e27fd810862da942fcde58eb0c42</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caead4a26ba4d373a96e4dac68ff9fdb45</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_refresh_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca17067ce9dae33780b432c50b2a53130b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_send_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cac7424fdd7360f72326f8f9c74d36d15b</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_data_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca66d958d23caaac30ab000f37c36a3406</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559ca55ffb1e77c92edb303a51f7221049c66</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cad1099efddc3ea3f8e91bd7953fef5c50</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caa804d83ad6928163af8e5b8c29c003dc</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_createpermission_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cad3da1d3b613236f00e9747a3874eb3c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559caf9886f762e46af82fc8122ba35a95a8a</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_indication</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cae56d07904cc9d8091f32a6973258146f</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_success_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cafcb4db651d71fd5c21f7bbb2def064a1</anchor>
- <arglist></arglist>
- </member>
- <member kind="enumvalue">
- <name>stun_channelbind_error_response</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ggabf2f8d8b846fe491470941a7e237559cab65200966087d7dd85dd17de30cde9ab</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_binding_t *</type>
- <name>tnet_stun_binding_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga60801a4caec4d4335f0b4fea0e63025e</anchor>
- <arglist>(tnet_fd_t fd, tnet_socket_type_t socket_type, const char *server_address, tnet_port_t server_port, const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_create_request</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga481bcd3d5bfdfda6561227bfcf1fc359</anchor>
- <arglist>(const tnet_stun_binding_t *binding)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_response_t *</type>
- <name>tnet_stun_send_unreliably</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga36147911b3c99cbf897930c971608a5f</anchor>
- <arglist>(tnet_fd_t localFD, uint16_t RTO, uint16_t Rc, const tnet_stun_message_t *message, struct sockaddr *server)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_send_bind</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8151700d692ca34abf3cd42982723aa7</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_stun_binding_t *binding)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_binding_id_t</type>
- <name>tnet_stun_bind</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gafad0d44c67c44e0cf91de149a32e8079</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_transacid_cmp</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gad2cd556a7d81575118646c3e3002af66</anchor>
- <arglist>(const tnet_stun_transacid_t id1, const tnet_stun_transacid_t id2)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_stun_attribute_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga9a8fea6f7fb4c6236bc4df85153d6af4</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_mapped_addr_t *</type>
- <name>tnet_stun_attribute_mapped_address_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga28ffe32f830bbe0f5b32a207538eb8b6</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_xmapped_addr_t *</type>
- <name>tnet_stun_attribute_xmapped_address_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gacd4af1df8c9e298a23d34df27e5dcc45</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_username_t *</type>
- <name>tnet_stun_attribute_username_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab92c8f62b2d188c9ac1528aa03da4b7e</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_integrity_t *</type>
- <name>tnet_stun_attribute_integrity_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga3c5f79313850ea8643132b093e11ef6a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_fingerprint_t *</type>
- <name>tnet_stun_attribute_fingerprint_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2432db4c4bb63da2327bb357361eef21</anchor>
- <arglist>(uint32_t fingerprint)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_errorcode_t *</type>
- <name>tnet_stun_attribute_errorcode_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaa51e8bc565195298fb3de24070f5614a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_realm_t *</type>
- <name>tnet_stun_attribute_realm_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga2d7ab50986b3af03951358ec4c2cfa8b</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_nonce_t *</type>
- <name>tnet_stun_attribute_nonce_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0cf404a4977b95a47c252f8101b099ce</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_unknowns_t *</type>
- <name>tnet_stun_attribute_unknowns_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga8a497b2b11b1a776ec37170ee14b6ac2</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_software_t *</type>
- <name>tnet_stun_attribute_software_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga719d8c3ac6588124533f03f70877e437</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_altserver_t *</type>
- <name>tnet_stun_attribute_altserver_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga586636541b8ebb9ea46d4df39a448121</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_stun_attribute_deserialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga642d9b382cea0cbbf0590b8b60be54c6</anchor>
- <arglist>(const void *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_attribute_serialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gabb81a19c0eeb9f47f0b9599d65d61d6e</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_stun_attribute_pad</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga9364909d8a9c38fa1be0dd48efa3fac3</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_create</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaaf1892e2a30f8b85e4e5b47622a6b9f3</anchor>
- <arglist>(const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_create_null</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga938bc40f8bb818f87c94eb42352cd0f3</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_stun_message_serialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaefd2306ef33e3611a98394e5b274a069</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_message_t *</type>
- <name>tnet_stun_message_deserialize</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga0f5f3b814bb84f3cb62802b1d9af275e</anchor>
- <arglist>(const uint8_t *data, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_stun_message_add_attribute</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gacb982af5ead9faf9e85b4e2f69e05d47</anchor>
- <arglist>(tnet_stun_message_t *self, tnet_stun_attribute_t **attribute)</arglist>
- </member>
- <member kind="function">
- <type>const tnet_stun_attribute_t *</type>
- <name>tnet_stun_message_get_attribute</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gaeac2966bdc80f798ec61f6f7ebfc6a95</anchor>
- <arglist>(const tnet_stun_message_t *self, tnet_stun_attribute_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>short</type>
- <name>tnet_stun_message_get_errorcode</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga7638d5816c344718874a113abd9739d5</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_stun_message_get_realm</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga6115407c7af73b3041c215ccd34e35b8</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>const char *</type>
- <name>tnet_stun_message_get_nonce</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga5e068d5474bfbd73e8cece833deac6b2</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="function">
- <type>int32_t</type>
- <name>tnet_stun_message_get_lifetime</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>ga12380617e5a883d3c175216c48245839</anchor>
- <arglist>(const tnet_stun_message_t *self)</arglist>
- </member>
- <member kind="variable">
- <type>TNET_BEGIN_DECLS typedef uint64_t</type>
- <name>tnet_stun_binding_id_t</name>
- <anchorfile>group__tnet__stun__group.html</anchorfile>
- <anchor>gab95871f186b8bf46b4630ab2ebb146aa</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_nat_group</name>
- <title>NAT Traversal API (STUN, TURN and ICE).</title>
- <filename>group__tnet__nat__group.html</filename>
- <class kind="struct">tnet_nat_context_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_NAT_DEFAULT_RTO</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga18cf72a341f3c785ab00a746286db1e6</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_NAT_DEFAULT_RC</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga5e809d1461c049e1830e5d376a07bd11</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_NAT_TCP_UDP_DEFAULT_PORT</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga0a871f1c40c7acb827f0513958ec8b21</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_nat_context_s</type>
- <name>tnet_nat_context_t</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4d037b7a4416b7e876163d3c05256a1e</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>void</type>
- <name>tnet_nat_context_handle_t</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga82ef754b59414ada0129fa558e9f3ec2</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_nat_context_handle_t *</type>
- <name>tnet_nat_context_create</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga49c2521bd48d6df2ce3a46e066ebe874</anchor>
- <arglist>(tnet_socket_type_t socket_type, const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_set_server_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga60f64045a1a894a41afdb73a332f8732</anchor>
- <arglist>(tnet_nat_context_handle_t *self, const char *server_address)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_set_server</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gadb5209238b5596dac88606e5130dc93f</anchor>
- <arglist>(tnet_nat_context_handle_t *self, const char *server_address, tnet_port_t server_port)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_binding_id_t</type>
- <name>tnet_nat_stun_bind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gaedaee292e59564e952b1ddda3b82f0a6</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, const tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_stun_get_reflexive_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga806a269daee5625262abe17c730d6bfc</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_stun_binding_id_t id, char **ipaddress, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_stun_unbind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>gac7501503711b402a1863967000970e16</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_stun_binding_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_id_t</type>
- <name>tnet_nat_turn_allocate</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga0388eae3c1cb2390070e49845a9e7a33</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, const tnet_fd_t localFD)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_get_reflexive_address</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4417d9c60fcfae071ffee563b1e5f4dd</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, char **ipaddress, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_allocation_refresh</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga6c0eb272fdaf34b696f40aa7f5279c24</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_unallocate</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga5ffc9393817f43bdd1331454a6f8af6e</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_id_t</type>
- <name>tnet_nat_turn_channel_bind</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga2c1bed31feafaa25d30cf8cc92b0b9e5</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, struct sockaddr_storage *peer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_channel_refresh</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga4995c26dc8e520f2820924082b1c5193</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_channel_binding_id_t id)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_channel_send</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga69719fb972fa3ccf667dd3999c221e8c</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_channel_binding_id_t id, const void *data, tsk_size_t size, int indication)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_nat_turn_add_permission</name>
- <anchorfile>group__tnet__nat__group.html</anchorfile>
- <anchor>ga67181e6f65d829d44089841fd72429f0</anchor>
- <arglist>(const tnet_nat_context_handle_t *self, tnet_turn_allocation_id_t id, const char *ipaddress, uint32_t timeout)</arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_socket_group</name>
- <title>Protocol agnostic socket</title>
- <filename>group__tnet__socket__group.html</filename>
- <member kind="function">
- <type>tnet_socket_t *</type>
- <name>tnet_socket_create_2</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>ga8ef4f4ef1882fb31a2db42c4ff0f6b3f</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, tsk_bool_t nonblocking, tsk_bool_t bindsocket)</arglist>
- </member>
- <member kind="function">
- <type>tnet_socket_t *</type>
- <name>tnet_socket_create</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>ga44cfc3407bc375c5b932bfe45a9de849</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_socket_close</name>
- <anchorfile>group__tnet__socket__group.html</anchorfile>
- <anchor>gad66bdc608588cb77d2f6447ef39927f1</anchor>
- <arglist>(tnet_socket_t *sock)</arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_utils_group</name>
- <title>Network utility functions.</title>
- <filename>group__tnet__utils__group.html</filename>
- <member kind="define">
- <type>#define</type>
- <name>TNET_CONNECT_TIMEOUT</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga2d7e6e8cff043b7f3c0bda66a7a728bd</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_interface_t *</type>
- <name>tnet_interface_create</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga519d8f6f2415bdf328e364f61bb47a39</anchor>
- <arglist>(const char *description, const void *mac_address, tsk_size_t mac_address_length)</arglist>
- </member>
- <member kind="function">
- <type>tnet_address_t *</type>
- <name>tnet_address_create</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga3e826cd2939bd297a73802b860262003</anchor>
- <arglist>(const char *ip)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_getlasterror</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac2b13fc342bfffa18868d8d91596961f</anchor>
- <arglist>(tnet_error_t *error)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_geterrno</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaf5def7b9d46329d20e8939a98482603f</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_interfaces_L_t *</type>
- <name>tnet_get_interfaces</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad982a81d6170a3e4826180ff72efe5fe</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_addresses_L_t *</type>
- <name>tnet_get_addresses</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gab6d29eedac011432c6f370a0de3c08ce</anchor>
- <arglist>(tnet_family_t family, unsigned unicast, unsigned anycast, unsigned multicast, unsigned dnsserver, long if_index)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_getbestsource</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac336e82f244c99e56b440b3b55c60c6a</anchor>
- <arglist>(const char *destination, tnet_port_t port, tnet_socket_type_t type, tnet_ip_t *source)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_getaddrinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga36ace730e3924849994ea87548d495be</anchor>
- <arglist>(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)</arglist>
- </member>
- <member kind="function">
- <type>void</type>
- <name>tnet_freeaddrinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga18b2d2888f220d3117ee3b681c464922</anchor>
- <arglist>(struct addrinfo *ai)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_sockaddr</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad10141d545cb251fbae028cb42fd0e03</anchor>
- <arglist>(tnet_fd_t fd, struct sockaddr_storage *result)</arglist>
- </member>
- <member kind="function">
- <type>tnet_socket_type_t</type>
- <name>tnet_get_socket_type</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gac13e28b8f1c767306245bd3bf13f5e3c</anchor>
- <arglist>(tnet_fd_t fd)</arglist>
- </member>
- <member kind="function">
- <type>tnet_family_t</type>
- <name>tnet_get_family</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga00003bf6a8749b31d4b60b09cf5337a3</anchor>
- <arglist>(const char *host, tnet_port_t port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_sockip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga05c917e9faa055994c0cfdf3e49b135a</anchor>
- <arglist>(struct sockaddr *addr, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_peerip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga9a18f5ae763f323f38200e11b9ba369d</anchor>
- <arglist>(tnet_fd_t localFD, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_get_ip_n_port</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga159fab1a9ef12230e9100b56c1470f17</anchor>
- <arglist>(tnet_fd_t fd, tnet_ip_t *ip, tnet_port_t *port)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_getnameinfo</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga043fd7c4105a0d2014f3e0670b888d94</anchor>
- <arglist>(const struct sockaddr *sa, socklen_t salen, char *node, socklen_t nodelen, char *service, socklen_t servicelen, int flags)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_gethostname</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga906ade6f28556babf47cb08dc947abd1</anchor>
- <arglist>(tnet_host_t *result)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_waitUntil</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga3365d143e90fc4a1f83d330f489feb08</anchor>
- <arglist>(tnet_fd_t fd, long timeout, tsk_bool_t writable)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_joingroup6</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga39276ddf27fe08518cf2431ae46a2045</anchor>
- <arglist>(tnet_fd_t fd, const char *multiaddr, unsigned iface_index)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_leavegroup6</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaf54873a5fed045c9eff1200ebb368266</anchor>
- <arglist>(tnet_fd_t fd, const char *multiaddr, unsigned iface_index)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockaddrinfo_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaeb05ffebc3d308fd2ebb39de546c70a5</anchor>
- <arglist>(const char *host, tnet_port_t port, enum tnet_socket_type_e type, struct sockaddr_storage *ai_addr, int *ai_family, int *ai_socktype, int *ai_protocol)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockaddr_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga0449294a58b8db4f81d835af2a535b90</anchor>
- <arglist>(const char *host, tnet_port_t port, tnet_socket_type_t type, struct sockaddr_storage *addr)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_init</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga02e3ba851395a9688b964cc228b732a8</anchor>
- <arglist>(const char *host, tnet_port_t port, enum tnet_socket_type_e type, tnet_fd_t *fd)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_set_mode</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gab9616a14cc2c468ad99b510e276abac0</anchor>
- <arglist>(tnet_fd_t fd, int nonBlocking)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_sendto</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga92fcf0392c9a93e2e578578479d4f35e</anchor>
- <arglist>(tnet_fd_t fd, const struct sockaddr *to, const void *buf, tsk_size_t size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_recvfrom</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gabbf0cddd16af300a66d0859ed79b3cda</anchor>
- <arglist>(tnet_fd_t fd, void *buf, tsk_size_t size, int flags, struct sockaddr *from)</arglist>
- </member>
- <member kind="function">
- <type>tsk_size_t</type>
- <name>tnet_sockfd_send</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga93356b04edf02a163bfaa421676f1efc</anchor>
- <arglist>(tnet_fd_t fd, const void *buf, tsk_size_t size, int flags)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_recv</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gaba9d8246797b995ecfb81f42f1bd1b96</anchor>
- <arglist>(tnet_fd_t fd, void *buf, tsk_size_t size, int flags)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_connectto</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gafe03cf813e644a3d2cd2de8666d7f9c8</anchor>
- <arglist>(tnet_fd_t fd, const struct sockaddr_storage *to)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_listen</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>ga92a295abbf85a361ee5c609994e21f05</anchor>
- <arglist>(tnet_fd_t fd, int backlog)</arglist>
- </member>
- <member kind="function">
- <type>tnet_fd_t</type>
- <name>tnet_sockfd_accept</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gae4350aa61a296325ce5dfc34fae616f8</anchor>
- <arglist>(tnet_fd_t fd, struct sockaddr *addr, socklen_t *addrlen)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_sockfd_close</name>
- <anchorfile>group__tnet__utils__group.html</anchorfile>
- <anchor>gad13808723477879ca310a70c527d850a</anchor>
- <arglist>(tnet_fd_t *fd)</arglist>
- </member>
- </compound>
- <compound kind="group">
- <name>tnet_turn_group</name>
- <title>TURN(draft-ietf-behave-turn-16) implementation.</title>
- <filename>group__tnet__turn__group.html</filename>
- <class kind="struct">tnet_turn_permission_s</class>
- <class kind="struct">tnet_turn_channel_binding_s</class>
- <class kind="struct">tnet_turn_allocation_s</class>
- <class kind="struct">tnet_turn_attribute_channelnum_s</class>
- <class kind="struct">tnet_turn_attribute_lifetime_s</class>
- <class kind="struct">tnet_turn_attribute_xpeer_addr_s</class>
- <class kind="struct">tnet_turn_attribute_data_s</class>
- <class kind="struct">tnet_turn_attribute_xrelayed_addr_s</class>
- <class kind="struct">tnet_turn_attribute_even_port_s</class>
- <class kind="struct">tnet_turn_attribute_reqtrans_s</class>
- <class kind="struct">tnet_turn_attribute_dontfrag_s</class>
- <class kind="struct">tnet_turn_attribute_restoken_s</class>
- <class kind="struct">tnet_turn_channel_data_s</class>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_PERMISSION_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae355f01c55abfcddc5e24b59acc170f6</anchor>
- <arglist></arglist>
- </member>
- <member kind="define">
- <type>#define</type>
- <name>TNET_TURN_CHANBIND_TIMEOUT_DEFAULT</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8aa082bcb28e67d8ec00e95b2fe5406f</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_permission_s</type>
- <name>tnet_turn_permission_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga022e47cd11dd0cd6b5985948e4f47421</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_channel_binding_s</type>
- <name>tnet_turn_channel_binding_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga869e95eb9bf494895d66ad7a68f39cd1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_allocation_s</type>
- <name>tnet_turn_allocation_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga4962ff19fd67702f01a1b1c107b19a56</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_channelnum_s</type>
- <name>tnet_turn_attribute_channelnum_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaa77bcb197c9e99794d67fd934d8c50c1</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_lifetime_s</type>
- <name>tnet_turn_attribute_lifetime_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga26a916f263289acaad0a56b7e374d028</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_xpeer_addr_s</type>
- <name>tnet_turn_attribute_xpeer_addr_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaa7fa88cb2c5f7269b94a916b66083235</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_data_s</type>
- <name>tnet_turn_attribute_data_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaaeab89d23a21fcfdaec9920fea7af597</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_xrelayed_addr_s</type>
- <name>tnet_turn_attribute_xrelayed_addr_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga07d7abdfc37b58ca81964c22a5012e41</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_even_port_s</type>
- <name>tnet_turn_attribute_even_port_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaa895b29c22d94e8cfcad5530a7d3264b</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_reqtrans_s</type>
- <name>tnet_turn_attribute_reqtrans_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga2ca2caa07d491a0d562e5b2e456d8f59</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_dontfrag_s</type>
- <name>tnet_turn_attribute_dontfrag_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gab703b2d48941e0a376c5c5d82d0c2b83</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>struct tnet_turn_attribute_restoken_s</type>
- <name>tnet_turn_attribute_restoken_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga981d08f23d6a6c2f660e0b8631703093</anchor>
- <arglist></arglist>
- </member>
- <member kind="typedef">
- <type>TNET_BEGIN_DECLS struct tnet_turn_channel_data_s</type>
- <name>tnet_turn_channel_data_t</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga4878f9790955d14d532e4de51ac0fa5f</anchor>
- <arglist></arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_t *</type>
- <name>tnet_turn_channel_binding_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga103e23a60bb64dd069e6ab091784a6d4</anchor>
- <arglist>(const tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_permission_t *</type>
- <name>tnet_turn_permission_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8b42fc6a1e3f09cef7c7bf7c681a8218</anchor>
- <arglist>(uint32_t timeout)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_t *</type>
- <name>tnet_turn_allocation_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8ab0618c59d331267df779a881eb5bab</anchor>
- <arglist>(tnet_fd_t fd, tnet_socket_type_t socket_type, const char *server_address, tnet_port_t server_port, const char *username, const char *password)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaddc8b26510c425a60140d25f131dcb85</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, tnet_stun_message_type_t type)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_allocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae1e001971df0be2311a06976e2f33201</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga2fde61ef85bcab916a3c9ce62789bd7e</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_unallocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga54c0fc2d0586f3160ab4f804c8a3950e</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_channel_bind</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gacca17b6face01e3f046e75f0624545eb</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_channel_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga86f4cd5cd926f84b75a3f8c86bcc348f</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_sendindication</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga346d00b42c27cb7f9a367d790137a351</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_request_t *</type>
- <name>tnet_turn_create_request_permission</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gad8ed3de2531edf3185d41109d9411f2b</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, va_list *app)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_send_request</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaae576cf98cdc0ef40b0b3361327ad9cf</anchor>
- <arglist>(const tnet_nat_context_t *context, tnet_turn_allocation_t *allocation, tnet_turn_create_request_func funcptr,...)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_allocation_id_t</type>
- <name>tnet_turn_allocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gad66c1ecb8963678e0d8451fef43eafd0</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, const tnet_fd_t localFD, tnet_socket_type_t socket_type)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_allocation_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8f8e9c71f4fcbddc9a95e7cf0ce333a6</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_unallocate</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gadfec48a9b5519234d73373a46b24606e</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_turn_allocation_t *allocation)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_channel_binding_id_t</type>
- <name>tnet_turn_channel_bind</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga3e6e2ae486927450c8a32d3000dd0e85</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_turn_allocation_t *allocation, struct sockaddr_storage *peer)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_channel_refresh</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga39d90117f000959af24720570c240b75</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_turn_channel_binding_t *channel_bind)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_channel_senddata</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga8623d3c7fec8d357ad29f76633643109</anchor>
- <arglist>(const struct tnet_nat_context_s *nat_context, const tnet_turn_channel_binding_t *channel_bind, const void *data, tsk_size_t size, int indication)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_add_permission</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gad49bc0f0bdd9832cf210825cc0b2156d</anchor>
- <arglist>(const tnet_nat_context_t *nat_context, tnet_turn_allocation_t *allocation, const char *ipaddress, uint32_t timeout)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_channelnum_t *</type>
- <name>tnet_turn_attribute_channelnum_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga407a64bdadf74e0cc58808f2f16de2fd</anchor>
- <arglist>(uint16_t number)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_lifetime_t *</type>
- <name>tnet_turn_attribute_lifetime_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga97892194ee263338e36c11d02d3c5ea2</anchor>
- <arglist>(uint32_t lifetime)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>tnet_turn_attribute_xpeer_addr_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gaf66bebd5bd8319c454a450dc092973c5</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_data_t *</type>
- <name>tnet_turn_attribute_data_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga6e749efbc0e6c2d181b7b5572dd4a84a</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_xrelayed_addr_t *</type>
- <name>tnet_turn_attribute_xrelayed_addr_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga27dd53bb4f5afd8fbe1b3c6450764d68</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_even_port_t *</type>
- <name>tnet_turn_attribute_even_port_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga9201f3b08080e3d9d73d91cce22fdb6b</anchor>
- <arglist>(unsigned R)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_reqtrans_t *</type>
- <name>tnet_turn_attribute_reqtrans_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga0f8e1e1c00b3c62c9c451ad2dbf8419e</anchor>
- <arglist>(tnet_proto_t protocol)</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_dontfrag_t *</type>
- <name>tnet_turn_attribute_dontfrag_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gab1baec0bd9b214f816737ccaf36846a7</anchor>
- <arglist>()</arglist>
- </member>
- <member kind="function">
- <type>tnet_turn_attribute_restoken_t *</type>
- <name>tnet_turn_attribute_restoken_create</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga498409f84c06d567eeeeb913b01117c8</anchor>
- <arglist>(const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>tnet_stun_attribute_t *</type>
- <name>tnet_turn_attribute_deserialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>gae0fac81dd69579c064501d497cd03ea8</anchor>
- <arglist>(tnet_stun_attribute_type_t type, uint16_t length, const void *payload, tsk_size_t payload_size)</arglist>
- </member>
- <member kind="function">
- <type>int</type>
- <name>tnet_turn_attribute_serialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga5c64288790f379c04d8aae14117e305c</anchor>
- <arglist>(const tnet_stun_attribute_t *attribute, tsk_buffer_t *output)</arglist>
- </member>
- <member kind="function">
- <type>tsk_buffer_t *</type>
- <name>tnet_turn_channel_data_serialize</name>
- <anchorfile>group__tnet__turn__group.html</anchorfile>
- <anchor>ga00439f15cae25f78c4fd515c2ad689fc</anchor>
- <arglist>(const tnet_turn_channel_data_t *message)</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_address_s</name>
- <filename>structtnet__address__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_family_t</type>
- <name>family</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>aa9ac1283cbbf630bf8c60c5ef94f3efd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>unicast</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>abc788348c8761780614d2cc33a39f236</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>anycast</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>a829249b4ca698adfb1ace5bf60a8256e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>multicast</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>a47a0efb9804fcd897e6eb6f2ae307a44</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>dnsserver</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>a9609c0c948615942826bd777e1397b7b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>ip</name>
- <anchorfile>structtnet__address__s.html</anchorfile>
- <anchor>afbc356cd0e25d1dbbece7c10fd025fa6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_ctx_s</name>
- <filename>structtnet__dhcp6__ctx__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>pen</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>ae2a65bb759a6405a5bf6e5de54b89d93</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>vendor_class_data</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>aab350594eb87cee0541230dca6312a17</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint64_t</type>
- <name>timeout</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>a053cdea1d85795444fe1aaa6b277a0ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_port_t</type>
- <name>port_client</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>a834bf951592c252db10122108915b42a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_port_t</type>
- <name>server_port</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>a35123c5d12252e9bbc6950e97753deb0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_interfaces_L_t *</type>
- <name>interfaces</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>a8156a841e9546fd0b833dcdc5f23af32</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_SAFEOBJ</name>
- <anchorfile>structtnet__dhcp6__ctx__s.html</anchorfile>
- <anchor>a9818e976fd73889027b42c32d628169f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_duid_en_s</name>
- <filename>structtnet__dhcp6__duid__en__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP6_DUID</name>
- <anchorfile>structtnet__dhcp6__duid__en__s.html</anchorfile>
- <anchor>a7d5ca788939104cbabceb0d3f5c87f12</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>en</name>
- <anchorfile>structtnet__dhcp6__duid__en__s.html</anchorfile>
- <anchor>a97a960f785c16a971f6c741af5c6ec2d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>indentifier</name>
- <anchorfile>structtnet__dhcp6__duid__en__s.html</anchorfile>
- <anchor>a1c2883892c8c127410362f7d7cb9b7bb</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_duid_ll_s</name>
- <filename>structtnet__dhcp6__duid__ll__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP6_DUID</name>
- <anchorfile>structtnet__dhcp6__duid__ll__s.html</anchorfile>
- <anchor>a7d5ca788939104cbabceb0d3f5c87f12</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_hardware_type_t</type>
- <name>htype</name>
- <anchorfile>structtnet__dhcp6__duid__ll__s.html</anchorfile>
- <anchor>af11ee3ba27d63138ab8f3d9d83ff4e31</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>address</name>
- <anchorfile>structtnet__dhcp6__duid__ll__s.html</anchorfile>
- <anchor>a0d802bc12d5854847214fa612961d6cc</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_duid_llt_s</name>
- <filename>structtnet__dhcp6__duid__llt__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP6_DUID</name>
- <anchorfile>structtnet__dhcp6__duid__llt__s.html</anchorfile>
- <anchor>a7d5ca788939104cbabceb0d3f5c87f12</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_hardware_type_t</type>
- <name>htype</name>
- <anchorfile>structtnet__dhcp6__duid__llt__s.html</anchorfile>
- <anchor>af11ee3ba27d63138ab8f3d9d83ff4e31</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>time</name>
- <anchorfile>structtnet__dhcp6__duid__llt__s.html</anchorfile>
- <anchor>ae73654f333e4363463ad8c594eca1905</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>address</name>
- <anchorfile>structtnet__dhcp6__duid__llt__s.html</anchorfile>
- <anchor>a0d802bc12d5854847214fa612961d6cc</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_duid_s</name>
- <filename>structtnet__dhcp6__duid__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp6__duid__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>initialized</name>
- <anchorfile>structtnet__dhcp6__duid__s.html</anchorfile>
- <anchor>adfdbb2f146565c87384f0090dba7a73e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp6_duid_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__dhcp6__duid__s.html</anchorfile>
- <anchor>ae0ae09e4fc714e06fdc68d480e758dff</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_message_s</name>
- <filename>structtnet__dhcp6__message__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp6__message__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp6_message_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__dhcp6__message__s.html</anchorfile>
- <anchor>a21e3b33868df6c3f411acbc6b4b8a170</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>transaction_id</name>
- <anchorfile>structtnet__dhcp6__message__s.html</anchorfile>
- <anchor>a87f9e7ddbb607ed91afc2e1c7c9a4a52</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp6_options_L_t *</type>
- <name>options</name>
- <anchorfile>structtnet__dhcp6__message__s.html</anchorfile>
- <anchor>a88b35352ad3437f608fef155b490245d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_option_data_s</name>
- <filename>structtnet__dhcp6__option__data__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp6__option__data__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_option_identifier_s</name>
- <filename>structtnet__dhcp6__option__identifier__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP6_OPTION_DATA</name>
- <anchorfile>structtnet__dhcp6__option__identifier__s.html</anchorfile>
- <anchor>a28e22ea1fe86a562264c53f323dea9ef</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp6_duid_t *</type>
- <name>duid</name>
- <anchorfile>structtnet__dhcp6__option__identifier__s.html</anchorfile>
- <anchor>a4b7a10003083e125dcd7c5df5d9da9b0</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_option_orequest_s</name>
- <filename>structtnet__dhcp6__option__orequest__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP6_OPTION_DATA</name>
- <anchorfile>structtnet__dhcp6__option__orequest__s.html</anchorfile>
- <anchor>a28e22ea1fe86a562264c53f323dea9ef</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>codes</name>
- <anchorfile>structtnet__dhcp6__option__orequest__s.html</anchorfile>
- <anchor>ab146c1f395904867fc1f7b8e98dd04a2</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_option_s</name>
- <filename>structtnet__dhcp6__option__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp6__option__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp6_option_code_t</type>
- <name>code</name>
- <anchorfile>structtnet__dhcp6__option__s.html</anchorfile>
- <anchor>a7537e49643e085c23e4f9d9f6976d5b9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>len</name>
- <anchorfile>structtnet__dhcp6__option__s.html</anchorfile>
- <anchor>a8aed22e2c7b283705ec82e0120515618</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp6_option_data_t *</type>
- <name>data</name>
- <anchorfile>structtnet__dhcp6__option__s.html</anchorfile>
- <anchor>a600e03a1fd89a07d22a9f21611282519</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp6_option_vendorclass_s</name>
- <filename>structtnet__dhcp6__option__vendorclass__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP6_OPTION_DATA</name>
- <anchorfile>structtnet__dhcp6__option__vendorclass__s.html</anchorfile>
- <anchor>a28e22ea1fe86a562264c53f323dea9ef</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>enterprise_number</name>
- <anchorfile>structtnet__dhcp6__option__vendorclass__s.html</anchorfile>
- <anchor>a5162ea2453bd20ec2797bafba71a9fdd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>vendor_class_data</name>
- <anchorfile>structtnet__dhcp6__option__vendorclass__s.html</anchorfile>
- <anchor>a20c300f54f6b4dd9cafecd09a4380b15</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_ctx_s</name>
- <filename>structtnet__dhcp__ctx__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>vendor_id</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a73f47ae0f7d0ed50c56505b044790bb3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>hostname</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>af203df082d5c6dcaa0c88b07cf86466d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>max_msg_size</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a8966178c69603c221293557d17f22920</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint64_t</type>
- <name>timeout</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a053cdea1d85795444fe1aaa6b277a0ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_port_t</type>
- <name>port_client</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a834bf951592c252db10122108915b42a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_port_t</type>
- <name>server_port</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a35123c5d12252e9bbc6950e97753deb0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_interfaces_L_t *</type>
- <name>interfaces</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a8156a841e9546fd0b833dcdc5f23af32</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_SAFEOBJ</name>
- <anchorfile>structtnet__dhcp__ctx__s.html</anchorfile>
- <anchor>a9818e976fd73889027b42c32d628169f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_message_s</name>
- <filename>structtnet__dhcp__message__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp_message_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>af4ceb1a7342479133b25455d3281b2ff</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp_message_op_t</type>
- <name>op</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>abbaa2226b43198cf6ceca447d386679d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_hardware_type_t</type>
- <name>htype</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>af11ee3ba27d63138ab8f3d9d83ff4e31</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>hlen</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>aff25a69752648654e56c4ff3e0b1b226</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>hops</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a2719bad26c6e7de2bc08439cea7111ce</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>xid</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>ad031a042dfee0c8192ef5e606c7a1354</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>secs</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a3836e59e9ca2b5b77a89533388b6458f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>flags</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a1e87af3c18a2fd36c61faf89949bdc3f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>ciaddr</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a0952ad95e626f53511afa5180222264b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>yiaddr</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a3cb44d0ce71c3b7201c22a41c00da379</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>siaddr</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>af938402cffa168e565c29cbc227a220a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>giaddr</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a2719c154fb9039aa55b367468df53de0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>chaddr</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a985fe29677d6c749d7471514cb744904</anchor>
- <arglist>[16]</arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>sname</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a197375c976d67dae5090e0065ead720c</anchor>
- <arglist>[64]</arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>file</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>a5c7003134e7a7486271d4f33c2e7b7de</anchor>
- <arglist>[128]</arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp_options_L_t *</type>
- <name>options</name>
- <anchorfile>structtnet__dhcp__message__s.html</anchorfile>
- <anchor>aaef79cd8df1bc83440d0b8652d0c9c4a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_option_dns_s</name>
- <filename>structtnet__dhcp__option__dns__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP_OPTION</name>
- <anchorfile>structtnet__dhcp__option__dns__s.html</anchorfile>
- <anchor>a76ae8d097b84b331a595990bed8b5c36</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_strings_L_t *</type>
- <name>servers</name>
- <anchorfile>structtnet__dhcp__option__dns__s.html</anchorfile>
- <anchor>a34baae61a8169fa438d42973816211c6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_option_paramslist_s</name>
- <filename>structtnet__dhcp__option__paramslist__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP_OPTION</name>
- <anchorfile>structtnet__dhcp__option__paramslist__s.html</anchorfile>
- <anchor>a76ae8d097b84b331a595990bed8b5c36</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_option_s</name>
- <filename>structtnet__dhcp__option__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp__option__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>initialized</name>
- <anchorfile>structtnet__dhcp__option__s.html</anchorfile>
- <anchor>adfdbb2f146565c87384f0090dba7a73e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp_option_code_t</type>
- <name>code</name>
- <anchorfile>structtnet__dhcp__option__s.html</anchorfile>
- <anchor>af5b9e621afaa9b16052826373021e507</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>value</name>
- <anchorfile>structtnet__dhcp__option__s.html</anchorfile>
- <anchor>a9bcf56196da97bfeb9b5411f2a5e07f6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_option_sip_s</name>
- <filename>structtnet__dhcp__option__sip__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DHCP_OPTION</name>
- <anchorfile>structtnet__dhcp__option__sip__s.html</anchorfile>
- <anchor>a76ae8d097b84b331a595990bed8b5c36</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_strings_L_t *</type>
- <name>servers</name>
- <anchorfile>structtnet__dhcp__option__sip__s.html</anchorfile>
- <anchor>a34baae61a8169fa438d42973816211c6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dhcp_params_s</name>
- <filename>structtnet__dhcp__params__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dhcp__params__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dhcp_option_code_t</type>
- <name>codes</name>
- <anchorfile>structtnet__dhcp__params__s.html</anchorfile>
- <anchor>a1be3fd6101ab9b0e039d4cf30e79cc46</anchor>
- <arglist>[TNET_DHCP_MAX_CODES]</arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>codes_count</name>
- <anchorfile>structtnet__dhcp__params__s.html</anchorfile>
- <anchor>a36227aefbb616902b06fbf9fb123123e</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_a_s</name>
- <filename>structtnet__dns__a__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__a__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>address</name>
- <anchorfile>structtnet__dns__a__s.html</anchorfile>
- <anchor>a879a8cdf605d02f8af8b2e216b8764f2</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_aaaa_s</name>
- <filename>structtnet__dns__aaaa__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__aaaa__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>address</name>
- <anchorfile>structtnet__dns__aaaa__s.html</anchorfile>
- <anchor>a879a8cdf605d02f8af8b2e216b8764f2</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_cache_entry_s</name>
- <filename>structtnet__dns__cache__entry__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dns__cache__entry__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>qname</name>
- <anchorfile>structtnet__dns__cache__entry__s.html</anchorfile>
- <anchor>a5a317b1553299b3cbe3ef6d6d2edcffc</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_qclass_t</type>
- <name>qclass</name>
- <anchorfile>structtnet__dns__cache__entry__s.html</anchorfile>
- <anchor>a15b4f97c9e5e000874a08a001eeb7733</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_qtype_t</type>
- <name>qtype</name>
- <anchorfile>structtnet__dns__cache__entry__s.html</anchorfile>
- <anchor>a3a9ecb9a634fe9bb31a40188e63a0370</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint64_t</type>
- <name>epoch</name>
- <anchorfile>structtnet__dns__cache__entry__s.html</anchorfile>
- <anchor>a7d1c4feed1318aeb0b96f657d87cd1ab</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_response_t *</type>
- <name>response</name>
- <anchorfile>structtnet__dns__cache__entry__s.html</anchorfile>
- <anchor>ac9ec66f6ecc7aa0aeddcd20828199d68</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_cname_s</name>
- <filename>structtnet__dns__cname__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__cname__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>cname</name>
- <anchorfile>structtnet__dns__cname__s.html</anchorfile>
- <anchor>a6b787eeec4924a37fc531cd8b950d9f9</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_ctx_s</name>
- <filename>structtnet__dns__ctx__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint64_t</type>
- <name>timeout</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a053cdea1d85795444fe1aaa6b277a0ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>recursion</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a97e982c6f7d2346cb1d95160a6667c3a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>edns0</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>ae4004c3075864042e3cc5cfc0ca333b3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>caching</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a3c98bef376fb846129f5ea3f78eddb98</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>int32_t</type>
- <name>cache_ttl</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a4000992e7b3bb97836c9ab0c296c5c64</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_port_t</type>
- <name>server_port</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a35123c5d12252e9bbc6950e97753deb0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_cache_t *</type>
- <name>cache</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>adac05d42fe5d85b2b1b7eaddd61d89d3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_addresses_L_t *</type>
- <name>servers</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>af91849b97bc1300e93e88f65a4ee44b1</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_SAFEOBJ</name>
- <anchorfile>structtnet__dns__ctx__s.html</anchorfile>
- <anchor>a9818e976fd73889027b42c32d628169f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_message_s</name>
- <filename>structtnet__dns__message__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dns__message__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>struct tnet_dns_message_s::@0</type>
- <name>Header</name>
- <anchorfile>structtnet__dns__message__s.html</anchorfile>
- <anchor>a3fb15af2e8eecc6a97afbe7f5e27980f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>ID</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a9bb81603329def43dbb55e1ae69996d9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>QR</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a086f2fd20aad22a949d4f224956df2b0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>OPCODE</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a1c66c4a468224548d0a57bd673067804</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>AA</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a66dcc3e3a86d61312fb31f2b3691b666</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>TC</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a06e1a0824bd69d7e69bf704151dd285d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>RD</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>ae119f53c101ac632e338d91ab4a70e5f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>RA</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a11895546e4853db4e31c6b25120597a4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>Z</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>ac908725f95d2f115071b18f9dc888e79</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>RCODE</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a2b8a72c36f3ce12ad2ddfb049f0e2857</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>QDCOUNT</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a0a3519cd5491ac721fc6733bdbd86848</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>ANCOUNT</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>af954605d8ed074c91aada60f313a9e2e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>NSCOUNT</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a93362533ee4f2611436af6ff8544753f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>ARCOUNT</name>
- <anchorfile>structtnet__dns__message__s_1_1@0.html</anchorfile>
- <anchor>a5c94102d026fbe7f04075f26bf27b34b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>struct tnet_dns_message_s::@1</type>
- <name>Question</name>
- <anchorfile>structtnet__dns__message__s.html</anchorfile>
- <anchor>ab11a7098fcf552ad821a90a5ba6f4fca</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>void *</type>
- <name>QNAME</name>
- <anchorfile>structtnet__dns__message__s_1_1@1.html</anchorfile>
- <anchor>a7334da930b8194cfe8e276bbd33b337b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_qtype_t</type>
- <name>QTYPE</name>
- <anchorfile>structtnet__dns__message__s_1_1@1.html</anchorfile>
- <anchor>a77d06692a4c99273384f2185126d8706</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_qclass_t</type>
- <name>QCLASS</name>
- <anchorfile>structtnet__dns__message__s_1_1@1.html</anchorfile>
- <anchor>acade00700b296187f7ac973346be44c9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_rrs_L_t *</type>
- <name>Answers</name>
- <anchorfile>structtnet__dns__message__s.html</anchorfile>
- <anchor>a67f770a7758696b3e5a5809eff26fb91</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_rrs_L_t *</type>
- <name>Authorities</name>
- <anchorfile>structtnet__dns__message__s.html</anchorfile>
- <anchor>a07b3c715e236c3e00b3db70b46857c8a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_rrs_L_t *</type>
- <name>Additionals</name>
- <anchorfile>structtnet__dns__message__s.html</anchorfile>
- <anchor>a04fa4444757b7ded3f659e622b5a2924</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_mx_s</name>
- <filename>structtnet__dns__mx__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__mx__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>preference</name>
- <anchorfile>structtnet__dns__mx__s.html</anchorfile>
- <anchor>a0895a8ef7de652dbf7ac2ece95f267df</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>exchange</name>
- <anchorfile>structtnet__dns__mx__s.html</anchorfile>
- <anchor>ae456886310fcf4a36c0d7a789ad3cb69</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_naptr_s</name>
- <filename>structtnet__dns__naptr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>order</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>afd05883aec8e6070b12674a77c541025</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>preference</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>a0895a8ef7de652dbf7ac2ece95f267df</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>flags</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>a4db5c33b255239e4bc2f302bc34a5339</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>services</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>aa5bac2721b92fccd4e1ad17978c69ec4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>regexp</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>ac1d9b998a1dabf12492d943e3bb765bb</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>replacement</name>
- <anchorfile>structtnet__dns__naptr__s.html</anchorfile>
- <anchor>ac92b8d0fe1aa141a4ae8c7d0c0dae69b</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_ns_s</name>
- <filename>structtnet__dns__ns__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__ns__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>nsdname</name>
- <anchorfile>structtnet__dns__ns__s.html</anchorfile>
- <anchor>a1d173c3317758caf3501a48cb6c0cf48</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_opt_s</name>
- <filename>structtnet__dns__opt__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__opt__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_ptr_s</name>
- <filename>structtnet__dns__ptr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__ptr__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>ptrdname</name>
- <anchorfile>structtnet__dns__ptr__s.html</anchorfile>
- <anchor>a243ff266ee3a887c216f55296768f10d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_rr_s</name>
- <filename>structtnet__dns__rr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>initialized</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>adfdbb2f146565c87384f0090dba7a73e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>name</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>a5ac083a645d964373f022d03df4849c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_qtype_t</type>
- <name>qtype</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>a3a9ecb9a634fe9bb31a40188e63a0370</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_dns_qclass_t</type>
- <name>qclass</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>a15b4f97c9e5e000874a08a001eeb7733</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>int32_t</type>
- <name>ttl</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>adcbcef3ebe212c2b2b6c75f10d9186c8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>rdlength</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>af06969277715677d7441c9b816daa2ec</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>void *</type>
- <name>rpdata</name>
- <anchorfile>structtnet__dns__rr__s.html</anchorfile>
- <anchor>a5c9a31069ba9dc307f5c3c383058873b</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_soa_s</name>
- <filename>structtnet__dns__soa__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>mname</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>a8721eff2350ed6076b3b331690c9eb67</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>rname</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>a4abc08d8bf8e71d81f1928b77675d9a8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>serial</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>a1149ca4bd0659030412db8e77bebdf88</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>refresh</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>a3185284e70c8e62827fa3c7932b82ce8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>retry</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>ae544e10bfc5a36197ae704603a9a6205</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>expire</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>ad2736d3cd8e2ca2d37da2b69cb721134</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>minimum</name>
- <anchorfile>structtnet__dns__soa__s.html</anchorfile>
- <anchor>a783317953fb3acf817a73a8af09d3636</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_srv_s</name>
- <filename>structtnet__dns__srv__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__srv__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>priority</name>
- <anchorfile>structtnet__dns__srv__s.html</anchorfile>
- <anchor>a0815784d41b3c13d42ce22367abfba1d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>weight</name>
- <anchorfile>structtnet__dns__srv__s.html</anchorfile>
- <anchor>a3c304b42c785c4cc5fa46842e2845a6b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>port</name>
- <anchorfile>structtnet__dns__srv__s.html</anchorfile>
- <anchor>a8e0798404bf2cf5dabb84c5ba9a4f236</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>target</name>
- <anchorfile>structtnet__dns__srv__s.html</anchorfile>
- <anchor>a23b26cdb3a71f525caf03b57f68d47fa</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_dns_txt_s</name>
- <filename>structtnet__dns__txt__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_DECLARE_DNS_RR</name>
- <anchorfile>structtnet__dns__txt__s.html</anchorfile>
- <anchor>a5c892c7c008cc59b0067d98a30c533cd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>txt_data</name>
- <anchorfile>structtnet__dns__txt__s.html</anchorfile>
- <anchor>aaa858f1e56c43a4400f94586c9ca8712</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_interface_s</name>
- <filename>structtnet__interface__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__interface__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>index</name>
- <anchorfile>structtnet__interface__s.html</anchorfile>
- <anchor>a360ebf6209d16512186ca7adb893abbb</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>description</name>
- <anchorfile>structtnet__interface__s.html</anchorfile>
- <anchor>a8444d6e0dfe2bbab0b5e7b24308f1559</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t *</type>
- <name>mac_address</name>
- <anchorfile>structtnet__interface__s.html</anchorfile>
- <anchor>a2571db5ff6bc43c1d6c4f3b9c8aefd87</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_size_t</type>
- <name>mac_address_length</name>
- <anchorfile>structtnet__interface__s.html</anchorfile>
- <anchor>a9d62b42964509e35907e16d57ab116a5</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_nat_context_s</name>
- <filename>structtnet__nat__context__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_type_t</type>
- <name>socket_type</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a27db52c3553ad7f3a50a3f846128f5f3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>username</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a9b20c006bd90a09e1465fb668700e81d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>password</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a59460a3ff2c12443d1022e5cc0fba85c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>software</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>ab7dea44af93feeae91fbc350466cd75b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>server_address</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>afbcb0d71ddd626fabdbf6646e7db8b99</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_port_t</type>
- <name>server_port</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a35123c5d12252e9bbc6950e97753deb0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>RTO</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>aebe0faf98d3286e1406eb88b460f0808</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>Rc</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a4df78cbd063bbc725d99e2f80b391cb1</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>enable_dontfrag</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>ad92b1c73d8fc7717638c6a6785b0e1b9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>enable_integrity</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a55e74a4b337b7b26c1b9edee06fec693</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>enable_evenport</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a43b8469c663698dd9c1c409de1c2452b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>enable_fingerprint</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>aaf103f3994e9b9c4b13612755ccb61d0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>use_dnsquery</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>a37ce943df13721eabe344a56caab6135</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_allocations_L_t *</type>
- <name>allocations</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>ab1bc1c207c419d587ddc9272a48c84ba</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_bindings_L_t *</type>
- <name>stun_bindings</name>
- <anchorfile>structtnet__nat__context__s.html</anchorfile>
- <anchor>ac49251b98f3dc1c92f5d2293e9badb8c</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_pollfd_s</name>
- <filename>structtnet__pollfd__s.html</filename>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>fd</name>
- <anchorfile>structtnet__pollfd__s.html</anchorfile>
- <anchor>a89776c821e7cb62a4acac46798a84137</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>short</type>
- <name>events</name>
- <anchorfile>structtnet__pollfd__s.html</anchorfile>
- <anchor>a82463718695c17094aa41c974eb35d61</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>short</type>
- <name>revents</name>
- <anchorfile>structtnet__pollfd__s.html</anchorfile>
- <anchor>ae9f68e4cc4edb4a9f8413e62e6167fde</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_socket_s</name>
- <filename>structtnet__socket__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__socket__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__socket__s.html</anchorfile>
- <anchor>ae2a94a75704f25f33d3f032e34feb205</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>fd</name>
- <anchorfile>structtnet__socket__s.html</anchorfile>
- <anchor>a89776c821e7cb62a4acac46798a84137</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_ip_t</type>
- <name>ip</name>
- <anchorfile>structtnet__socket__s.html</anchorfile>
- <anchor>a520b46ef780bbe6f719ca59c3bfecd74</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>port</name>
- <anchorfile>structtnet__socket__s.html</anchorfile>
- <anchor>a8e0798404bf2cf5dabb84c5ba9a4f236</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_tls_socket_handle_t *</type>
- <name>tlshandle</name>
- <anchorfile>structtnet__socket__s.html</anchorfile>
- <anchor>afb9a3122a38768304a5134beb27e1298</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_altserver_s</name>
- <filename>structtnet__stun__attribute__altserver__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__altserver__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_addr_family_t</type>
- <name>family</name>
- <anchorfile>structtnet__stun__attribute__altserver__s.html</anchorfile>
- <anchor>a49f24db0b2265a9d515199d570dd4e38</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>port</name>
- <anchorfile>structtnet__stun__attribute__altserver__s.html</anchorfile>
- <anchor>a8e0798404bf2cf5dabb84c5ba9a4f236</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>server</name>
- <anchorfile>structtnet__stun__attribute__altserver__s.html</anchorfile>
- <anchor>af4d154cbfef4303a47869a02cd589624</anchor>
- <arglist>[128]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_errorcode_s</name>
- <filename>structtnet__stun__attribute__errorcode__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__errorcode__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>_class</name>
- <anchorfile>structtnet__stun__attribute__errorcode__s.html</anchorfile>
- <anchor>a1e336cb34c9f32b8d3b30ef50e4d5212</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>number</name>
- <anchorfile>structtnet__stun__attribute__errorcode__s.html</anchorfile>
- <anchor>af57eaec6f3dec6de717735725c9908a6</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>reason_phrase</name>
- <anchorfile>structtnet__stun__attribute__errorcode__s.html</anchorfile>
- <anchor>a18bf51f0b416cc27103a7a47db3442de</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_fingerprint_s</name>
- <filename>structtnet__stun__attribute__fingerprint__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__fingerprint__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>value</name>
- <anchorfile>structtnet__stun__attribute__fingerprint__s.html</anchorfile>
- <anchor>ae7f66047e6e39ba2bb6af8b95f00d1dd</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_integrity_s</name>
- <filename>structtnet__stun__attribute__integrity__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__integrity__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_sha1digest_t</type>
- <name>sha1digest</name>
- <anchorfile>structtnet__stun__attribute__integrity__s.html</anchorfile>
- <anchor>a7c7001f4d433128aec28db91a69bc8ed</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_mapped_addr_s</name>
- <filename>structtnet__stun__attribute__mapped__addr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__mapped__addr__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_addr_family_t</type>
- <name>family</name>
- <anchorfile>structtnet__stun__attribute__mapped__addr__s.html</anchorfile>
- <anchor>a49f24db0b2265a9d515199d570dd4e38</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>port</name>
- <anchorfile>structtnet__stun__attribute__mapped__addr__s.html</anchorfile>
- <anchor>a8e0798404bf2cf5dabb84c5ba9a4f236</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>address</name>
- <anchorfile>structtnet__stun__attribute__mapped__addr__s.html</anchorfile>
- <anchor>ae4879450c8041e3ab7fd9d958557f826</anchor>
- <arglist>[16]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_nonce_s</name>
- <filename>structtnet__stun__attribute__nonce__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__nonce__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>value</name>
- <anchorfile>structtnet__stun__attribute__nonce__s.html</anchorfile>
- <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_realm_s</name>
- <filename>structtnet__stun__attribute__realm__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__realm__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>value</name>
- <anchorfile>structtnet__stun__attribute__realm__s.html</anchorfile>
- <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_s</name>
- <filename>structtnet__stun__attribute__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__stun__attribute__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_attribute_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__stun__attribute__s.html</anchorfile>
- <anchor>a612b04c5b268170d0fb2ac0ef564ed83</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>length</name>
- <anchorfile>structtnet__stun__attribute__s.html</anchorfile>
- <anchor>a1892eba2086d12ac2b09005aeb09ea3b</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_software_s</name>
- <filename>structtnet__stun__attribute__software__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__software__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>value</name>
- <anchorfile>structtnet__stun__attribute__software__s.html</anchorfile>
- <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_unknowns_s</name>
- <filename>structtnet__stun__attribute__unknowns__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__unknowns__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>value</name>
- <anchorfile>structtnet__stun__attribute__unknowns__s.html</anchorfile>
- <anchor>a9bcf56196da97bfeb9b5411f2a5e07f6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_username_s</name>
- <filename>structtnet__stun__attribute__username__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__username__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>value</name>
- <anchorfile>structtnet__stun__attribute__username__s.html</anchorfile>
- <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_attribute_xmapped_addr_s</name>
- <filename>structtnet__stun__attribute__xmapped__addr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__stun__attribute__xmapped__addr__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_addr_family_t</type>
- <name>family</name>
- <anchorfile>structtnet__stun__attribute__xmapped__addr__s.html</anchorfile>
- <anchor>a49f24db0b2265a9d515199d570dd4e38</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>xport</name>
- <anchorfile>structtnet__stun__attribute__xmapped__addr__s.html</anchorfile>
- <anchor>ac021791c2ad249b108a5155d4c252a9f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>xaddress</name>
- <anchorfile>structtnet__stun__attribute__xmapped__addr__s.html</anchorfile>
- <anchor>ac365f9f3b4cedc84224afd91b2597ccb</anchor>
- <arglist>[16]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_binding_s</name>
- <filename>structtnet__stun__binding__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_binding_id_t</type>
- <name>id</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a68541ba67a916edaa34f4da31009b97f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>username</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a9b20c006bd90a09e1465fb668700e81d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>password</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a59460a3ff2c12443d1022e5cc0fba85c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>realm</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a78e609bc32bd5a9820209fe62b39963f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>nonce</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a814af5af8d9ea73885c8216c0e547e2a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>software</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>ab7dea44af93feeae91fbc350466cd75b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>localFD</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a2f7fda9a08aade674a360b301268cd92</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_type_t</type>
- <name>socket_type</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a27db52c3553ad7f3a50a3f846128f5f3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>struct sockaddr_storage</type>
- <name>server</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>acbcb80535e518b7b9f636338f948b88c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_attribute_mapped_addr_t *</type>
- <name>maddr</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a1bb895a0f6e6fbe93ac0bc346bc52526</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_attribute_xmapped_addr_t *</type>
- <name>xmaddr</name>
- <anchorfile>structtnet__stun__binding__s.html</anchorfile>
- <anchor>a5405872105ef7f32cabddc425993f69a</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_stun_message_s</name>
- <filename>structtnet__stun__message__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_message_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>adc708b7d327e9a9f6e5d1a9f16fe1749</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>length</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a1892eba2086d12ac2b09005aeb09ea3b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>cookie</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>af9c930e4206148386b1d991e325a132d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_transacid_t</type>
- <name>transaction_id</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>ab4cd124218c6c7c7ddf534b043600832</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>fingerprint</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a493cb3f41b0f9ef0178425b3fbde3ab1</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>integrity</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a84c2663b2f0442ae8a425bc5f30bda7e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>dontfrag</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>ab49b896e3ea7fc8cf5f432b267defcb0</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>username</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a9b20c006bd90a09e1465fb668700e81d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>password</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a59460a3ff2c12443d1022e5cc0fba85c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>realm</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a78e609bc32bd5a9820209fe62b39963f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>nonce</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>a814af5af8d9ea73885c8216c0e547e2a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_attributes_L_t *</type>
- <name>attributes</name>
- <anchorfile>structtnet__stun__message__s.html</anchorfile>
- <anchor>ae438e8c15b79d8a020645d347bfa1b07</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_tls_socket_s</name>
- <filename>structtnet__tls__socket__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>fd</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a89776c821e7cb62a4acac46798a84137</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>tlsdir_cas</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>ae62052a42cd023f8808e171b378f4b60</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>tlsfile_ca</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a701226d05472d05739e211d30f70d807</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>tlsfile_pvk</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>af212d67dfc07942c1233ee3f63283a7f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>tlsfile_pbk</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>afe37b95eacff572796705a62da5c3efa</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>password</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a59460a3ff2c12443d1022e5cc0fba85c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>initialized</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a8ac8977c8c92fcb0ed6caa2e0d04accf</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>isClient</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>adb1b45db1067196c7b01b18200cb3cfd</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>mutual_auth</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a2e86b79dfe517f8511a18db552a9127d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_SAFEOBJ</name>
- <anchorfile>structtnet__tls__socket__s.html</anchorfile>
- <anchor>a9818e976fd73889027b42c32d628169f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_transport_event_s</name>
- <filename>structtnet__transport__event__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__transport__event__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_transport_event_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__transport__event__s.html</anchorfile>
- <anchor>a312995fc2313cbfd77bf91982e33fb20</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>void *</type>
- <name>data</name>
- <anchorfile>structtnet__transport__event__s.html</anchorfile>
- <anchor>a735984d41155bc1032e09bece8f8d66d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_size_t</type>
- <name>size</name>
- <anchorfile>structtnet__transport__event__s.html</anchorfile>
- <anchor>a2af13611e30c0884ab2e1837c4da8282</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const void *</type>
- <name>callback_data</name>
- <anchorfile>structtnet__transport__event__s.html</anchorfile>
- <anchor>a7322346207ed833d5550334332388ff9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>fd</name>
- <anchorfile>structtnet__transport__event__s.html</anchorfile>
- <anchor>a89776c821e7cb62a4acac46798a84137</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_transport_s</name>
- <filename>structtnet__transport__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_RUNNABLE</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>ae8fba71ac54cd6376ba9e5ed1cc87cf3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_type_t</type>
- <name>type</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>ae2a94a75704f25f33d3f032e34feb205</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>local_ip</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a39812ff38e55c55387e819985e9f0d20</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_nat_context_handle_t *</type>
- <name>natt_ctx</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a4e40b6b4f2c827184bbfca2abafb683b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_t *</type>
- <name>master</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a451156669819ac6a2cad58a45835c391</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_object_t *</type>
- <name>context</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a59bd43e8ef51cf37b1a9f3fc448a061e</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>prepared</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>ae5b63fb7d1ac17bfe0f40c1358e2ced2</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>void *</type>
- <name>mainThreadId</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a6588fc232f5001c84152098b2fe7695a</anchor>
- <arglist>[1]</arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>description</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a8444d6e0dfe2bbab0b5e7b24308f1559</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_transport_cb_f</type>
- <name>callback</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>ac61a9065fbee4489fa84180893b95ccf</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>const void *</type>
- <name>callback_data</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>a7322346207ed833d5550334332388ff9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>struct tnet_transport_s::@2</type>
- <name>tls</name>
- <anchorfile>structtnet__transport__s.html</anchorfile>
- <anchor>ac02d2ad6d228210ff5fec79944ea49c4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>ca</name>
- <anchorfile>structtnet__transport__s_1_1@2.html</anchorfile>
- <anchor>aed75f3bb30e712d0a8ca4e18ac0d1582</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>pvk</name>
- <anchorfile>structtnet__transport__s_1_1@2.html</anchorfile>
- <anchor>a7b558b120c654899dda385dd65db4c57</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>pbk</name>
- <anchorfile>structtnet__transport__s_1_1@2.html</anchorfile>
- <anchor>a2bc102c261f5f1170825a6d7bfd11783</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>have_tls</name>
- <anchorfile>structtnet__transport__s_1_1@2.html</anchorfile>
- <anchor>a7ca0d9a85aad8a836d212fcf9e87bb91</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_allocation_s</name>
- <filename>structtnet__turn__allocation__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_allocation_id_t</type>
- <name>id</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a03aaf241a003d900555e758014c83005</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>relay_address</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>ad328f54cea8a7008376efcb17f465d43</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_attribute_mapped_addr_t *</type>
- <name>maddr</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a1bb895a0f6e6fbe93ac0bc346bc52526</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_attribute_xmapped_addr_t *</type>
- <name>xmaddr</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a5405872105ef7f32cabddc425993f69a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>localFD</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a2f7fda9a08aade674a360b301268cd92</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_type_t</type>
- <name>socket_type</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a27db52c3553ad7f3a50a3f846128f5f3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>struct sockaddr_storage</type>
- <name>server</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>acbcb80535e518b7b9f636338f948b88c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>username</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a9b20c006bd90a09e1465fb668700e81d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>password</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a59460a3ff2c12443d1022e5cc0fba85c</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>realm</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a78e609bc32bd5a9820209fe62b39963f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>nonce</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a814af5af8d9ea73885c8216c0e547e2a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>timeout</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>ab5627d8d8b095c198e2523c44ca380ac</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>char *</type>
- <name>software</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>ab7dea44af93feeae91fbc350466cd75b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_channel_bindings_L_t *</type>
- <name>channel_bindings</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>ac6f07a52b24bd7a43b9cef1654b7c2cc</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_permissions_L_t *</type>
- <name>permissions</name>
- <anchorfile>structtnet__turn__allocation__s.html</anchorfile>
- <anchor>a9c680afbc7b9cda04536e1a7a4d25a11</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_channelnum_s</name>
- <filename>structtnet__turn__attribute__channelnum__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__channelnum__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>number</name>
- <anchorfile>structtnet__turn__attribute__channelnum__s.html</anchorfile>
- <anchor>adf69c46b3dd2878c66bab78eddc40b04</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>rffu</name>
- <anchorfile>structtnet__turn__attribute__channelnum__s.html</anchorfile>
- <anchor>a423dae59c5f12250dfcf3cc92aa1dd06</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_data_s</name>
- <filename>structtnet__turn__attribute__data__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__data__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_buffer_t *</type>
- <name>value</name>
- <anchorfile>structtnet__turn__attribute__data__s.html</anchorfile>
- <anchor>a9bcf56196da97bfeb9b5411f2a5e07f6</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_dontfrag_s</name>
- <filename>structtnet__turn__attribute__dontfrag__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__dontfrag__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_even_port_s</name>
- <filename>structtnet__turn__attribute__even__port__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__even__port__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>R</name>
- <anchorfile>structtnet__turn__attribute__even__port__s.html</anchorfile>
- <anchor>ad6607ab22ad9d395773e899a3594bad8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>unsigned</type>
- <name>rffu</name>
- <anchorfile>structtnet__turn__attribute__even__port__s.html</anchorfile>
- <anchor>a80faf1f85f4fda0fad2c1c69903c33dc</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_lifetime_s</name>
- <filename>structtnet__turn__attribute__lifetime__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__lifetime__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>value</name>
- <anchorfile>structtnet__turn__attribute__lifetime__s.html</anchorfile>
- <anchor>ae7f66047e6e39ba2bb6af8b95f00d1dd</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_reqtrans_s</name>
- <filename>structtnet__turn__attribute__reqtrans__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__reqtrans__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_proto_t</type>
- <name>protocol</name>
- <anchorfile>structtnet__turn__attribute__reqtrans__s.html</anchorfile>
- <anchor>a8710e9ef6114f67bcc2651eca8a2c7fe</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>rffu</name>
- <anchorfile>structtnet__turn__attribute__reqtrans__s.html</anchorfile>
- <anchor>a05893d2921be797904cdd2bf010deef8</anchor>
- <arglist>[3]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_restoken_s</name>
- <filename>structtnet__turn__attribute__restoken__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__restoken__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>value</name>
- <anchorfile>structtnet__turn__attribute__restoken__s.html</anchorfile>
- <anchor>ac7a8beb4da4fc8eb8acfec13711a134f</anchor>
- <arglist>[8]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_xpeer_addr_s</name>
- <filename>structtnet__turn__attribute__xpeer__addr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__xpeer__addr__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_addr_family_t</type>
- <name>family</name>
- <anchorfile>structtnet__turn__attribute__xpeer__addr__s.html</anchorfile>
- <anchor>a49f24db0b2265a9d515199d570dd4e38</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>xport</name>
- <anchorfile>structtnet__turn__attribute__xpeer__addr__s.html</anchorfile>
- <anchor>ac021791c2ad249b108a5155d4c252a9f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>xaddress</name>
- <anchorfile>structtnet__turn__attribute__xpeer__addr__s.html</anchorfile>
- <anchor>ac365f9f3b4cedc84224afd91b2597ccb</anchor>
- <arglist>[16]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_attribute_xrelayed_addr_s</name>
- <filename>structtnet__turn__attribute__xrelayed__addr__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TNET_STUN_DECLARE_ATTRIBUTE</name>
- <anchorfile>structtnet__turn__attribute__xrelayed__addr__s.html</anchorfile>
- <anchor>a1c1589f58715cc05bb80c012d5979003</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_stun_addr_family_t</type>
- <name>family</name>
- <anchorfile>structtnet__turn__attribute__xrelayed__addr__s.html</anchorfile>
- <anchor>a49f24db0b2265a9d515199d570dd4e38</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>xport</name>
- <anchorfile>structtnet__turn__attribute__xrelayed__addr__s.html</anchorfile>
- <anchor>ac021791c2ad249b108a5155d4c252a9f</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint8_t</type>
- <name>xaddress</name>
- <anchorfile>structtnet__turn__attribute__xrelayed__addr__s.html</anchorfile>
- <anchor>ac365f9f3b4cedc84224afd91b2597ccb</anchor>
- <arglist>[16]</arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_channel_binding_s</name>
- <filename>structtnet__turn__channel__binding__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__turn__channel__binding__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_channel_binding_id_t</type>
- <name>id</name>
- <anchorfile>structtnet__turn__channel__binding__s.html</anchorfile>
- <anchor>a273d32d05d21a77ad9228c9d1c74c83d</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>struct tnet_turn_allocation_s *</type>
- <name>allocation</name>
- <anchorfile>structtnet__turn__channel__binding__s.html</anchorfile>
- <anchor>a2c19d1b38ea7789b9f45212624c9dfbf</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>xpeer</name>
- <anchorfile>structtnet__turn__channel__binding__s.html</anchorfile>
- <anchor>af8cae1f1a500edee2f605e5f0396def4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>timeout</name>
- <anchorfile>structtnet__turn__channel__binding__s.html</anchorfile>
- <anchor>ab5627d8d8b095c198e2523c44ca380ac</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_channel_data_s</name>
- <filename>structtnet__turn__channel__data__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__turn__channel__data__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>chanel_number</name>
- <anchorfile>structtnet__turn__channel__data__s.html</anchorfile>
- <anchor>aa8c7009bf6b107e3990e62487e1cc7b8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint16_t</type>
- <name>length</name>
- <anchorfile>structtnet__turn__channel__data__s.html</anchorfile>
- <anchor>a1892eba2086d12ac2b09005aeb09ea3b</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>void *</type>
- <name>data</name>
- <anchorfile>structtnet__turn__channel__data__s.html</anchorfile>
- <anchor>a735984d41155bc1032e09bece8f8d66d</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>tnet_turn_permission_s</name>
- <filename>structtnet__turn__permission__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtnet__turn__permission__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_turn_attribute_xpeer_addr_t *</type>
- <name>xpeer</name>
- <anchorfile>structtnet__turn__permission__s.html</anchorfile>
- <anchor>af8cae1f1a500edee2f605e5f0396def4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>uint32_t</type>
- <name>timeout</name>
- <anchorfile>structtnet__turn__permission__s.html</anchorfile>
- <anchor>ab5627d8d8b095c198e2523c44ca380ac</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>transport_context_s</name>
- <filename>structtransport__context__s.html</filename>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_OBJECT</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_size_t</type>
- <name>count</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a8c61335783a0ae87ef83b2d6f66b8da2</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>short</type>
- <name>events</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a82463718695c17094aa41c974eb35d61</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>pipeW</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a841535bae34461ff3e32b07f1cb00b63</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>pipeR</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>aaaab8b3a7b18afa190a00dceaab764f2</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_pollfd_t</type>
- <name>ufds</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a6a4c56d8e36390b3d8e544d8c3eeeb75</anchor>
- <arglist>[TNET_MAX_FDS]</arglist>
- </member>
- <member kind="variable">
- <type>transport_socket_t *</type>
- <name>sockets</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a11b0d00a213c3f69344cbaa58be4ffa8</anchor>
- <arglist>[TNET_MAX_FDS]</arglist>
- </member>
- <member kind="variable">
- <type></type>
- <name>TSK_DECLARE_SAFEOBJ</name>
- <anchorfile>structtransport__context__s.html</anchorfile>
- <anchor>a9818e976fd73889027b42c32d628169f</anchor>
- <arglist></arglist>
- </member>
- </compound>
- <compound kind="struct">
- <name>transport_socket_s</name>
- <filename>structtransport__socket__s.html</filename>
- <member kind="variable">
- <type>tnet_fd_t</type>
- <name>fd</name>
- <anchorfile>structtransport__socket__s.html</anchorfile>
- <anchor>a89776c821e7cb62a4acac46798a84137</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>owner</name>
- <anchorfile>structtransport__socket__s.html</anchorfile>
- <anchor>a505b73b867902aa65af2b62016d88a13</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>connected</name>
- <anchorfile>structtransport__socket__s.html</anchorfile>
- <anchor>a3fe755c96cb04252e2da49e1c6355dc4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tsk_bool_t</type>
- <name>paused</name>
- <anchorfile>structtransport__socket__s.html</anchorfile>
- <anchor>a480d0b63a1a89d000626afe5691982e9</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_socket_type_t</type>
- <name>type</name>
- <anchorfile>structtransport__socket__s.html</anchorfile>
- <anchor>ae2a94a75704f25f33d3f032e34feb205</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>tnet_tls_socket_handle_t *</type>
- <name>tlshandle</name>
- <anchorfile>structtransport__socket__s.html</anchorfile>
- <anchor>afb9a3122a38768304a5134beb27e1298</anchor>
- <arglist></arglist>
- </member>
- </compound>
-</tagfile>
diff --git a/branches/1.0/tinyNET/tinyNET.vcproj b/branches/1.0/tinyNET/tinyNET.vcproj
deleted file mode 100644
index 4a3e0a7..0000000
--- a/branches/1.0/tinyNET/tinyNET.vcproj
+++ /dev/null
@@ -1,771 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="tinyNET"
- ProjectGUID="{7522A458-92F4-4259-B906-E84C2A65D9F1}"
- RootNamespace="tinyNET"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="src;&quot;..\thirdparties\win32\include&quot;;&quot;..\tinySAK\src&quot;"
- PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;TNET_HAVE_OPENSSL_H=1;WIN32;_WIN32_WINNT=0x0501;_DEBUG;_WINDOWS;_USRDLL;TINYNET_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- WarnAsError="true"
- DebugInformationFormat="4"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib IPHLPAPI.lib &quot;$(OutDir)\tinySAK.lib&quot; &quot;..\thirdparties\win32\lib\openssl\libeay32.lib&quot; &quot;..\thirdparties\win32\lib\openssl\ssleay32.lib&quot;"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
- IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="1"
- />
- <Tool
- Name="VCCLCompilerTool"
- ExecutionBucket="7"
- Optimization="0"
- AdditionalIncludeDirectories="src;&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
- PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;TINYNET_EXPORTS;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
- MinimalRebuild="true"
- RuntimeLibrary="3"
- TreatWChar_tAsBuiltInType="false"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- WarnAsError="true"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2.lib IPHLPAPI.lib $(OutDir)\tinySAK.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="8"
- TargetMachine="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCCodeSignTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory="%CSIDL_PROGRAM_FILES%\test"
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories="src;&quot;..\thirdparties\win32\include&quot;;&quot;..\tinySAK\src&quot;"
- PreprocessorDefinitions="TNET_HAVE_OPENSSL_H=1;WIN32;NDEBUG;_WINDOWS;_USRDLL;TINYNET_EXPORTS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="false"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- WarnAsError="true"
- DebugInformationFormat="0"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib IPHLPAPI.lib &quot;$(OutDir)\tinySAK.lib&quot; &quot;..\thirdparties\win32\lib\openssl\libeay32.lib&quot; &quot;..\thirdparties\win32\lib\openssl\ssleay32.lib&quot;"
- LinkIncremental="1"
- IgnoreDefaultLibraryNames="MSVCRTD"
- GenerateDebugInformation="false"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
- OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
- IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="1"
- />
- <Tool
- Name="VCCLCompilerTool"
- ExecutionBucket="7"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;TINYNET_EXPORTS;NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="false"
- SubSystem="8"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCCodeSignTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- <DeploymentTool
- ForceDirty="-1"
- RemoteDirectory=""
- RegisterOutput="0"
- AdditionalFiles=""
- />
- <DebuggerTool
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="source(*.c)"
- >
- <File
- RelativePath=".\src\tnet.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_auth.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_endianness.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_nat.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_poll.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_socket.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_transport.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_transport_poll.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_transport_win32.c"
- >
- </File>
- <File
- RelativePath=".\src\tnet_utils.c"
- >
- </File>
- <Filter
- Name="stun"
- >
- <File
- RelativePath=".\src\stun\tnet_stun.c"
- >
- </File>
- <File
- RelativePath=".\src\stun\tnet_stun_attribute.c"
- >
- </File>
- <File
- RelativePath=".\src\stun\tnet_stun_message.c"
- >
- </File>
- </Filter>
- <Filter
- Name="turn"
- >
- <File
- RelativePath=".\src\turn\tnet_turn.c"
- >
- </File>
- <File
- RelativePath=".\src\turn\tnet_turn_attribute.c"
- >
- </File>
- <File
- RelativePath=".\src\turn\tnet_turn_message.c"
- >
- </File>
- </Filter>
- <Filter
- Name="ice"
- >
- <File
- RelativePath=".\src\ice\tnet_ice.c"
- >
- </File>
- </Filter>
- <Filter
- Name="dns"
- >
- <File
- RelativePath=".\src\dns\tnet_dns.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_a.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_aaaa.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_cname.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_message.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_mx.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_naptr.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_ns.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_opt.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_ptr.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_regexp.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_resolvconf.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_rr.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_soa.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_srv.c"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_txt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="dhcp4"
- >
- <File
- RelativePath=".\src\dhcp\tnet_dhcp.c"
- >
- </File>
- <File
- RelativePath=".\src\dhcp\tnet_dhcp_message.c"
- >
- </File>
- <File
- RelativePath=".\src\dhcp\tnet_dhcp_option.c"
- >
- </File>
- <File
- RelativePath=".\src\dhcp\tnet_dhcp_option_sip.c"
- >
- </File>
- </Filter>
- <Filter
- Name="dhcp6"
- >
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6.c"
- >
- </File>
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6_duid.c"
- >
- </File>
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6_message.c"
- >
- </File>
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6_option.c"
- >
- </File>
- </Filter>
- <Filter
- Name="tls"
- >
- <File
- RelativePath=".\src\tls\tnet_tls.c"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="include(*.h)"
- >
- <File
- RelativePath=".\src\tinynet.h"
- >
- </File>
- <File
- RelativePath=".\src\tinynet_config.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_auth.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_endianness.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_hardwares.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_nat.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_poll.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_proto.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_socket.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_transport.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_types.h"
- >
- </File>
- <File
- RelativePath=".\src\tnet_utils.h"
- >
- </File>
- <Filter
- Name="stun"
- >
- <File
- RelativePath=".\src\stun\tnet_stun.h"
- >
- </File>
- <File
- RelativePath=".\src\stun\tnet_stun_attribute.h"
- >
- </File>
- <File
- RelativePath=".\src\stun\tnet_stun_message.h"
- >
- </File>
- </Filter>
- <Filter
- Name="turn"
- >
- <File
- RelativePath=".\src\turn\tnet_turn.h"
- >
- </File>
- <File
- RelativePath=".\src\turn\tnet_turn_attribute.h"
- >
- </File>
- <File
- RelativePath=".\src\turn\tnet_turn_message.h"
- >
- </File>
- </Filter>
- <Filter
- Name="ice"
- >
- <File
- RelativePath=".\src\ice\tnet_ice.h"
- >
- </File>
- </Filter>
- <Filter
- Name="dns"
- >
- <File
- RelativePath=".\src\dns\tnet_dns.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_a.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_aaaa.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_cname.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_message.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_mx.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_naptr.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_ns.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_opt.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_ptr.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_regexp.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_resolvconf.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_rr.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_soa.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_srv.h"
- >
- </File>
- <File
- RelativePath=".\src\dns\tnet_dns_txt.h"
- >
- </File>
- </Filter>
- <Filter
- Name="dhcp"
- >
- <File
- RelativePath=".\src\dhcp\tnet_dhcp.h"
- >
- </File>
- <File
- RelativePath=".\src\dhcp\tnet_dhcp_message.h"
- >
- </File>
- <File
- RelativePath=".\src\dhcp\tnet_dhcp_option.h"
- >
- </File>
- <File
- RelativePath=".\src\dhcp\tnet_dhcp_option_sip.h"
- >
- </File>
- </Filter>
- <Filter
- Name="dhcp6"
- >
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6.h"
- >
- </File>
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6_duid.h"
- >
- </File>
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6_message.h"
- >
- </File>
- <File
- RelativePath=".\src\dhcp6\tnet_dhcp6_option.h"
- >
- </File>
- </Filter>
- <Filter
- Name="tls"
- >
- <File
- RelativePath=".\src\tls\tnet_tls.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="ragel(.rl)"
- >
- <File
- RelativePath=".\ragel\tnet_dns_regexp.rl"
- >
- </File>
- <File
- RelativePath=".\ragel\tnet_dns_resolvconf.rl"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
OpenPOWER on IntegriCloud