Main Page   Class Hierarchy   Compound List   File List   Compound Members  

socketSCTP_t.hpp

00001 /*
00002  *  This program is free software; you can redistribute it and/or modify
00003  *  it under the terms of the GNU General Public License as published by
00004  *  the Free Software Foundation; either version 2 of the License, or
00005  *  (at your option) any later version.
00006  *
00007  *  This program is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  *  GNU General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  *
00016  * (c)Copyright 2006 Hewlett-Packard Development Company, LP.
00017  *
00018  */
00019 #ifndef _SOCKETSCTP_T_HPP
00020 #define _SOCKETSCTP_T_HPP
00021 
00022 #include <sctp.h>
00023 #include <ext_socket.h>
00024 
00025 #ifndef AF_INET6
00026 #define USE_IPV4_ONLY
00027 #endif
00028 
00029 #if defined(__hpux)
00030 
00031 #ifdef _XOPEN_SOURCE_EXTENDED
00032 #include <arpa/inet.h>
00033 #else 
00034 #include <netinet/in.h>
00035 #endif
00036 
00037 #else
00038 #include <netinet/in.h>
00039 #endif
00040 
00041 #define DEFAULT_IP_BUFFER_SIZE 65535
00042 
00043 #if defined (__hpux) 
00044 #ifdef _XOPEN_SOURCE_EXTENDED
00045 #define tool_socklen_t  socklen_t
00046 #else
00047 #define tool_socklen_t  int
00048 #endif
00049 #else
00050 #define tool_socklen_t  socklen_t
00051 #endif
00052 
00053 #if defined(__cplusplus) && defined (__hpux)
00054 #define RICAST(type, val) (reinterpret_cast<type> (val))
00055 #else
00056 #define RICAST(type, val) ((type)(val))
00057 #endif
00058 
00059 #ifdef USE_IPV4_ONLY
00060 
00061 typedef struct sockaddr_in      T_SockAddrStorage ;
00062 #define SOCKADDR_IN_SIZE(a)     sizeof(struct sockaddr_in)
00063 #define SOCKADDR_FAMILY         sin_family
00064 #else
00065 
00066 typedef struct sockaddr_storage T_SockAddrStorage ;
00067 #define SOCKADDR_IN_SIZE(a) \
00068   (((a)->ss_family == AF_INET) ? sizeof(struct sockaddr_in) \
00069                                : sizeof(struct sockaddr_in6))
00070 #define SOCKADDR_FAMILY        ss_family
00071 #endif
00072 
00073 
00074 // system call 
00075 
00076 #define call_shutdown   ext_shutdown
00077 #define call_open       ext_open
00078 #define call_close      ext_close
00079 #define call_bind       ext_bind
00080 #define call_accept     ext_accept
00081 #define call_setsockopt ext_setsockopt
00082 #define call_getsockopt ext_getsockopt
00083 #define call_listen     ext_listen
00084 #define call_send       ext_send
00085 #define call_read       ext_read
00086 #define call_socket     ext_socket
00087 #define call_connect    ext_connect
00088 #define call_fcntl      ext_fcntl
00089 #define call_select     ext_select
00090 #define call_recvmsg    ext_recvmsg
00091 
00092 #endif
00093 
00094 

Generated on Wed Mar 7 14:44:59 2007 for Seagull by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002