Home | History | Annotate | Download | only in oscl_html
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
      3 <title>osclconfig_io.h Source File</title>
      4 <link href="doxygen.css" rel="stylesheet" type="text/css">
      5 </head><body>
      6 <!-- Generated by Doxygen 1.2.18 -->
      7 <center>
      8 <a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
      9 <hr><h1>osclconfig_io.h</h1><a href="osclconfig__io_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span>
     10 00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
     11 00003 
     12 00004 <span class="comment">//     O S C L C O N F I G _ I O</span>
     13 00005 
     14 00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
     15 00007 
     16 00008 
     17 00017 <span class="preprocessor">#ifndef OSCLCONFIG_IO_H_INCLUDED</span>
     18 00018 <span class="preprocessor"></span><span class="preprocessor">#define OSCLCONFIG_IO_H_INCLUDED</span>
     19 00019 <span class="preprocessor"></span>
     20 00020 <span class="preprocessor">#ifndef OSCLCONFIG_H_INCLUDED</span>
     21 00021 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig_8h.html">osclconfig.h</a>"</span>
     22 00022 <span class="preprocessor">#endif</span>
     23 00023 <span class="preprocessor"></span>
     24 00024 <span class="preprocessor">#if (OSCL_HAS_ANDROID_SUPPORT) &amp;&amp; (ENABLE_MEMORY_PLAYBACK)</span>
     25 00025 <span class="preprocessor"></span><span class="preprocessor">#include &lt;media/MediaPlayerInterface.h&gt;</span>
     26 00026 <span class="preprocessor">#endif</span>
     27 00027 <span class="preprocessor"></span>
     28 00028 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
     29 00029 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
     30 00030 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
     31 00031 <span class="preprocessor">#include &lt;sys/socket.h&gt;</span>
     32 00032 <span class="preprocessor">#include &lt;netinet/in.h&gt;</span>
     33 00033 <span class="preprocessor">#include &lt;arpa/inet.h&gt;</span>
     34 00034 <span class="preprocessor">#include &lt;fcntl.h&gt;</span>
     35 00035 <span class="preprocessor">#include &lt;signal.h&gt;</span>
     36 00036 <span class="preprocessor">#include &lt;netdb.h&gt;</span>
     37 00037 <span class="preprocessor">#include &lt;sys/mman.h&gt;</span>
     38 00038 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
     39 00039 <span class="preprocessor">#include &lt;errno.h&gt;</span>
     40 00040 <span class="preprocessor">#include &lt;sys/vfs.h&gt;</span>
     41 00041 <span class="preprocessor">#include &lt;dirent.h&gt;</span>
     42 00042 <span class="comment">//#include &lt;glob.h&gt;</span>
     43 00043 <span class="preprocessor">#if (OSCL_HAS_ANSI_STDLIB_SUPPORT)</span>
     44 00044 <span class="preprocessor"></span><span class="preprocessor">#if (OSCL_HAS_UNIX_SUPPORT)</span>
     45 00045 <span class="preprocessor"></span><span class="preprocessor">#include &lt;sys/stat.h&gt;</span>
     46 00046 <span class="preprocessor">#endif</span>
     47 00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
     48 00048 <span class="preprocessor"></span>
     49 00049 <span class="comment">//For File I/O</span>
     50 <a name="l00050"></a><a class="code" href="osclconfig__io_8h.html#a0">00050</a> <span class="preprocessor">#define OSCL_HAS_GLOB 0</span>
     51 <a name="l00051"></a><a class="code" href="osclconfig__io_8h.html#a1">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_ANSI_FILE_IO_SUPPORT 1</span>
     52 <a name="l00052"></a><a class="code" href="osclconfig__io_8h.html#a2">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_SYMBIAN_COMPATIBLE_IO_FUNCTION 0</span>
     53 <a name="l00053"></a><a class="code" href="osclconfig__io_8h.html#a3">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_NATIVE_FILE_CACHE_ENABLE 1</span>
     54 <a name="l00054"></a><a class="code" href="osclconfig__io_8h.html#a4">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_FILE_BUFFER_MAX_SIZE       32768</span>
     55 <a name="l00055"></a><a class="code" href="osclconfig__io_8h.html#a5">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_PV_FILE_CACHE  0</span>
     56 <a name="l00056"></a><a class="code" href="osclconfig__io_8h.html#a6">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_LARGE_FILE_SUPPORT 1</span>
     57 00057 <span class="preprocessor"></span>
     58 00058 <span class="comment">//For Sockets</span>
     59 <a name="l00059"></a><a class="code" href="osclconfig__io_8h.html#a7">00059</a> <span class="preprocessor">#define OSCL_HAS_SYMBIAN_SOCKET_SERVER 0</span>
     60 <a name="l00060"></a><a class="code" href="osclconfig__io_8h.html#a8">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_SYMBIAN_DNS_SERVER 0</span>
     61 <a name="l00061"></a><a class="code" href="osclconfig__io_8h.html#a9">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_BERKELEY_SOCKETS 1</span>
     62 <a name="l00062"></a><a class="code" href="osclconfig__io_8h.html#a10">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_HAS_SOCKET_SUPPORT 1</span>
     63 00063 <span class="preprocessor"></span>
     64 00064 <span class="comment">//basic socket types</span>
     65 <a name="l00065"></a><a class="code" href="osclconfig__io_8h.html#a44">00065</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="osclconfig__io_8h.html#a44">TOsclSocket</a>;
     66 <a name="l00066"></a><a class="code" href="osclconfig__io_8h.html#a45">00066</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>sockaddr_in <a class="code" href="osclconfig__io_8h.html#a45">TOsclSockAddr</a>;
     67 <a name="l00067"></a><a class="code" href="osclconfig__io_8h.html#a46">00067</a> <span class="keyword">typedef</span> socklen_t <a class="code" href="osclconfig__io_8h.html#a46">TOsclSockAddrLen</a>;
     68 00068 
     69 00069 <span class="comment">//Init addr macro, inet_addr returns an uint32</span>
     70 <a name="l00070"></a><a class="code" href="osclconfig__io_8h.html#a11">00070</a> <span class="preprocessor">#define OsclValidInetAddr(addr) (inet_addr(addr)!=INADDR_NONE)</span>
     71 00071 <span class="preprocessor"></span>
     72 00072 <span class="comment">//address conversion macro-- from string to network address.</span>
     73 <a name="l00073"></a><a class="code" href="osclconfig__io_8h.html#a12">00073</a> <span class="preprocessor">#define OsclMakeSockAddr(sockaddr,port,addrstr,ok)\</span>
     74 00074 <span class="preprocessor">        sockaddr.sin_family=OSCL_AF_INET;\</span>
     75 00075 <span class="preprocessor">        sockaddr.sin_port=htons(port);\</span>
     76 00076 <span class="preprocessor">        int32 result=inet_aton((const char*)addrstr,&amp;sockaddr.sin_addr);\</span>
     77 00077 <span class="preprocessor">        ok=(result!=0);</span>
     78 00078 <span class="preprocessor"></span>
     79 00079 <span class="comment">//address conversion macro-- from network address to string</span>
     80 <a name="l00080"></a><a class="code" href="osclconfig__io_8h.html#a13">00080</a> <span class="preprocessor">#define OsclUnMakeSockAddr(sockaddr,addrstr)\</span>
     81 00081 <span class="preprocessor">        addrstr=inet_ntoa(sockaddr.sin_addr);</span>
     82 00082 <span class="preprocessor"></span>
     83 00083 <span class="comment">//wrappers for berkeley socket calls</span>
     84 <a name="l00084"></a><a class="code" href="osclconfig__io_8h.html#a14">00084</a> <span class="preprocessor">#define OsclSetRecvBufferSize(s,val,ok,err) \</span>
     85 00085 <span class="preprocessor">        ok=(setsockopt(s,SOL_SOCKET,SO_RCVBUF,(char*)&amp;val, sizeof(int)) !=-1);\</span>
     86 00086 <span class="preprocessor">        if (!ok)err=errno</span>
     87 00087 <span class="preprocessor"></span>
     88 <a name="l00088"></a><a class="code" href="osclconfig__io_8h.html#a15">00088</a> <span class="preprocessor">#define OsclBind(s,addr,ok,err)\</span>
     89 00089 <span class="preprocessor">    TOsclSockAddr* tmpadr = &amp;addr;\</span>
     90 00090 <span class="preprocessor">    sockaddr* sadr = OSCL_STATIC_CAST(sockaddr*, tmpadr);\</span>
     91 00091 <span class="preprocessor">        ok=(bind(s,sadr,sizeof(addr))!=(-1));\</span>
     92 00092 <span class="preprocessor">        if (!ok)err=errno</span>
     93 00093 <span class="preprocessor"></span>
     94 <a name="l00094"></a><a class="code" href="osclconfig__io_8h.html#a16">00094</a> <span class="preprocessor">#define OsclJoin(s,addr,ok,err)\</span>
     95 00095 <span class="preprocessor">{\</span>
     96 00096 <span class="preprocessor">                struct ip_mreq mreq; \</span>
     97 00097 <span class="preprocessor">            void* p = &amp;addr; \</span>
     98 00098 <span class="preprocessor">            ok=(bind(s,(sockaddr*)p,sizeof(addr))!=(-1));\</span>
     99 00099 <span class="preprocessor">        mreq.imr_multiaddr.s_addr = addr.sin_addr.s_addr ; \</span>
    100 00100 <span class="preprocessor">        mreq.imr_interface.s_addr = htonl(INADDR_ANY); \</span>
    101 00101 <span class="preprocessor">        ok=(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &amp;mreq, sizeof(struct ip_mreq))!=(-1)); \</span>
    102 00102 <span class="preprocessor">        if (!ok)err=errno;\</span>
    103 00103 <span class="preprocessor">}</span>
    104 00104 <span class="preprocessor"></span>
    105 00105 
    106 <a name="l00106"></a><a class="code" href="osclconfig__io_8h.html#a17">00106</a> <span class="preprocessor">#define OsclListen(s,size,ok,err)\</span>
    107 00107 <span class="preprocessor">        ok=(listen(iSocket,qSize)!=(-1));\</span>
    108 00108 <span class="preprocessor">        if (!ok)err=errno</span>
    109 00109 <span class="preprocessor"></span>
    110 <a name="l00110"></a><a class="code" href="osclconfig__io_8h.html#a18">00110</a> <span class="preprocessor">#define OsclAccept(s,accept_s,ok,err,wouldblock)\</span>
    111 00111 <span class="preprocessor">        accept_s=accept(s,NULL,NULL);\</span>
    112 00112 <span class="preprocessor">        ok=(accept_s!=(-1));\</span>
    113 00113 <span class="preprocessor">        if (!ok){err=errno;wouldblock=(err==EAGAIN||err==EWOULDBLOCK);}</span>
    114 00114 <span class="preprocessor"></span>
    115 <a name="l00115"></a><a class="code" href="osclconfig__io_8h.html#a19">00115</a> <span class="preprocessor">#define OsclSetNonBlocking(s,ok,err)\</span>
    116 00116 <span class="preprocessor">        ok=(fcntl(s,F_SETFL,O_NONBLOCK)!=(-1));\</span>
    117 00117 <span class="preprocessor">        if (!ok)err=errno</span>
    118 00118 <span class="preprocessor"></span>
    119 <a name="l00119"></a><a class="code" href="osclconfig__io_8h.html#a20">00119</a> <span class="preprocessor">#define OsclShutdown(s,how,ok,err)\</span>
    120 00120 <span class="preprocessor">        ok=(shutdown(iSocket,how)!=(-1));\</span>
    121 00121 <span class="preprocessor">        if (!ok)err=errno</span>
    122 00122 <span class="preprocessor"></span>
    123 <a name="l00123"></a><a class="code" href="osclconfig__io_8h.html#a21">00123</a> <span class="preprocessor">#define OsclSocket(s,fam,type,prot,ok,err)\</span>
    124 00124 <span class="preprocessor">        s=socket(fam,type,prot);\</span>
    125 00125 <span class="preprocessor">        ok=(s!=(-1));\</span>
    126 00126 <span class="preprocessor">        if (!ok)err=errno</span>
    127 00127 <span class="preprocessor"></span>
    128 <a name="l00128"></a><a class="code" href="osclconfig__io_8h.html#a22">00128</a> <span class="preprocessor">#define OsclSendTo(s,buf,len,addr,ok,err,nbytes,wouldblock)\</span>
    129 00129 <span class="preprocessor">    TOsclSockAddr* tmpadr = &amp;addr;\</span>
    130 00130 <span class="preprocessor">    sockaddr* sadr = OSCL_STATIC_CAST(sockaddr*, tmpadr);\</span>
    131 00131 <span class="preprocessor">        nbytes=sendto(s,(const void*)(buf),(size_t)(len),0,sadr,(socklen_t)sizeof(addr));\</span>
    132 00132 <span class="preprocessor">        ok=(nbytes!=(-1));\</span>
    133 00133 <span class="preprocessor">        if (!ok){err=errno;wouldblock=(err==EAGAIN||err==EWOULDBLOCK);}</span>
    134 00134 <span class="preprocessor"></span>
    135 <a name="l00135"></a><a class="code" href="osclconfig__io_8h.html#a23">00135</a> <span class="preprocessor">#define OsclSend(s,buf,len,ok,err,nbytes,wouldblock)\</span>
    136 00136 <span class="preprocessor">        nbytes=send(s,(const void*)(buf),(size_t)(len),0);\</span>
    137 00137 <span class="preprocessor">        ok=(nbytes!=(-1));\</span>
    138 00138 <span class="preprocessor">        if (!ok){err=errno;wouldblock=(err==EAGAIN||err==EWOULDBLOCK);}</span>
    139 00139 <span class="preprocessor"></span>
    140 <a name="l00140"></a><a class="code" href="osclconfig__io_8h.html#a24">00140</a> <span class="preprocessor">#define OsclCloseSocket(s,ok,err)\</span>
    141 00141 <span class="preprocessor">        ok=(close(s)!=(-1));\</span>
    142 00142 <span class="preprocessor">        if (!ok)err=errno</span>
    143 00143 <span class="preprocessor"></span>
    144 <a name="l00144"></a><a class="code" href="osclconfig__io_8h.html#a25">00144</a> <span class="preprocessor">#define OsclConnect(s,addr,ok,err,wouldblock)\</span>
    145 00145 <span class="preprocessor">    TOsclSockAddr* tmpadr = &amp;addr;\</span>
    146 00146 <span class="preprocessor">    sockaddr* sadr = OSCL_STATIC_CAST(sockaddr*, tmpadr);\</span>
    147 00147 <span class="preprocessor">        ok=(connect(s,sadr,sizeof(addr))!=(-1));\</span>
    148 00148 <span class="preprocessor">        if (!ok){err=errno;wouldblock=(err==EINPROGRESS);}</span>
    149 00149 <span class="preprocessor"></span>
    150 <a name="l00150"></a><a class="code" href="osclconfig__io_8h.html#a26">00150</a> <span class="preprocessor">#define OsclGetAsyncSockErr(s,ok,err)\</span>
    151 00151 <span class="preprocessor">        int opterr;socklen_t optlen=sizeof(opterr);\</span>
    152 00152 <span class="preprocessor">        ok=(getsockopt(s,SOL_SOCKET,SO_ERROR,(void *)&amp;opterr,&amp;optlen)!=(-1));\</span>
    153 00153 <span class="preprocessor">        if(ok)err=opterr;else err=errno;</span>
    154 00154 <span class="preprocessor"></span>
    155 00155 <span class="comment">//unix reports connect completion in write set in the getsockopt</span>
    156 00156 <span class="comment">//error.</span>
    157 <a name="l00157"></a><a class="code" href="osclconfig__io_8h.html#a27">00157</a> <span class="preprocessor">#define OsclConnectComplete(s,wset,eset,success,fail,ok,err)\</span>
    158 00158 <span class="preprocessor">        success=fail=false;\</span>
    159 00159 <span class="preprocessor">        if (FD_ISSET(s,&amp;eset))\</span>
    160 00160 <span class="preprocessor">        {fail=true;OsclGetAsyncSockErr(s,ok,err);}\</span>
    161 00161 <span class="preprocessor">        else if (FD_ISSET(s,&amp;wset))\</span>
    162 00162 <span class="preprocessor">        {OsclGetAsyncSockErr(s,ok,err);if (ok &amp;&amp; err==0)success=true;else fail=true;}</span>
    163 00163 <span class="preprocessor"></span>
    164 <a name="l00164"></a><a class="code" href="osclconfig__io_8h.html#a28">00164</a> <span class="preprocessor">#define OsclRecv(s,buf,len,ok,err,nbytes,wouldblock)\</span>
    165 00165 <span class="preprocessor">        nbytes=recv(s,(void *)(buf),(size_t)(len),0);\</span>
    166 00166 <span class="preprocessor">        ok=(nbytes!=(-1));\</span>
    167 00167 <span class="preprocessor">        if (!ok){err=errno;wouldblock=(err==EAGAIN);}</span>
    168 00168 <span class="preprocessor"></span>
    169 <a name="l00169"></a><a class="code" href="osclconfig__io_8h.html#a29">00169</a> <span class="preprocessor">#define OsclRecvFrom(s,buf,len,paddr,paddrlen,ok,err,nbytes,wouldblock)\</span>
    170 00170 <span class="preprocessor">{\</span>
    171 00171 <span class="preprocessor">void* p=paddr;\</span>
    172 00172 <span class="preprocessor">nbytes=recvfrom(s,(void*)(buf),(size_t)(len),0,(struct sockaddr*)p,paddrlen);\</span>
    173 00173 <span class="preprocessor">        ok=(nbytes!=(-1));\</span>
    174 00174 <span class="preprocessor">        if (!ok){err=errno;wouldblock=(err==EAGAIN);}\</span>
    175 00175 <span class="preprocessor">}</span>
    176 00176 <span class="preprocessor"></span>
    177 00177 
    178 <a name="l00178"></a><a class="code" href="osclconfig__io_8h.html#a30">00178</a> <span class="preprocessor">#define OsclSocketSelect(nfds,rd,wr,ex,timeout,ok,err,nhandles)\</span>
    179 00179 <span class="preprocessor">        nhandles=select(nfds,&amp;rd,&amp;wr,&amp;ex,&amp;timeout);\</span>
    180 00180 <span class="preprocessor">        ok=(nhandles!=(-1));\</span>
    181 00181 <span class="preprocessor">        if (!ok)err=errno</span>
    182 00182 <span class="preprocessor"></span>
    183 00183 <span class="comment">//there's not really any socket startup needed on unix, but</span>
    184 00184 <span class="comment">//you need to define a signal handler for SIGPIPE to avoid</span>
    185 00185 <span class="comment">//broken pipe crashes.</span>
    186 <a name="l00186"></a><a class="code" href="osclconfig__io_8h.html#a31">00186</a> <span class="preprocessor">#define OsclSocketStartup(ok)\</span>
    187 00187 <span class="preprocessor">        signal(SIGPIPE,SIG_IGN);\</span>
    188 00188 <span class="preprocessor">        ok=true</span>
    189 00189 <span class="preprocessor"></span>
    190 <a name="l00190"></a><a class="code" href="osclconfig__io_8h.html#a32">00190</a> <span class="preprocessor">#define OsclSocketCleanup(ok)\</span>
    191 00191 <span class="preprocessor">        signal(SIGPIPE,SIG_DFL);\</span>
    192 00192 <span class="preprocessor">        ok=true</span>
    193 00193 <span class="preprocessor"></span>
    194 00194 <span class="comment">//hostent type</span>
    195 <a name="l00195"></a><a class="code" href="osclconfig__io_8h.html#a47">00195</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>hostent <a class="code" href="osclconfig__io_8h.html#a47">TOsclHostent</a>;
    196 00196 
    197 00197 <span class="comment">//wrapper for gethostbyname</span>
    198 <a name="l00198"></a><a class="code" href="osclconfig__io_8h.html#a33">00198</a> <span class="preprocessor">#define OsclGethostbyname(name,hostent,ok,err)\</span>
    199 00199 <span class="preprocessor">        hostent=gethostbyname((const char*)name);\</span>
    200 00200 <span class="preprocessor">        ok=(hostent!=NULL);\</span>
    201 00201 <span class="preprocessor">        if (!ok)err=errno;</span>
    202 00202 <span class="preprocessor"></span>
    203 00203 <span class="comment">//extract dotted address from a hostent</span>
    204 <a name="l00204"></a><a class="code" href="osclconfig__io_8h.html#a34">00204</a> <span class="preprocessor">#define OsclGetDottedAddr(hostent,dottedaddr,ok)\</span>
    205 00205 <span class="preprocessor">        long *_hostaddr=(long*)hostent-&gt;h_addr_list[0];\</span>
    206 00206 <span class="preprocessor">        struct in_addr _inaddr;\</span>
    207 00207 <span class="preprocessor">        _inaddr.s_addr=*_hostaddr;\</span>
    208 00208 <span class="preprocessor">        dottedaddr=inet_ntoa(_inaddr);\</span>
    209 00209 <span class="preprocessor">        ok=(dottedaddr!=NULL);</span>
    210 00210 <span class="preprocessor"></span>
    211 00211 <span class="comment">//socket shutdown codes</span>
    212 <a name="l00212"></a><a class="code" href="osclconfig__io_8h.html#a35">00212</a> <span class="preprocessor">#define OSCL_SD_RECEIVE SHUT_RD</span>
    213 <a name="l00213"></a><a class="code" href="osclconfig__io_8h.html#a36">00213</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SD_SEND SHUT_WR</span>
    214 <a name="l00214"></a><a class="code" href="osclconfig__io_8h.html#a37">00214</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SD_BOTH SHUT_RDWR</span>
    215 00215 <span class="preprocessor"></span>
    216 00216 <span class="comment">//address family codes</span>
    217 <a name="l00217"></a><a class="code" href="osclconfig__io_8h.html#a38">00217</a> <span class="preprocessor">#define OSCL_AF_INET AF_INET</span>
    218 00218 <span class="preprocessor"></span>
    219 00219 <span class="comment">//socket type codes</span>
    220 <a name="l00220"></a><a class="code" href="osclconfig__io_8h.html#a39">00220</a> <span class="preprocessor">#define OSCL_SOCK_STREAM SOCK_STREAM</span>
    221 <a name="l00221"></a><a class="code" href="osclconfig__io_8h.html#a40">00221</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SOCK_DATAGRAM SOCK_DGRAM</span>
    222 00222 <span class="preprocessor"></span>
    223 00223 <span class="comment">//IP protocol codes</span>
    224 <a name="l00224"></a><a class="code" href="osclconfig__io_8h.html#a41">00224</a> <span class="preprocessor">#define OSCL_IPPROTO_TCP IPPROTO_TCP</span>
    225 <a name="l00225"></a><a class="code" href="osclconfig__io_8h.html#a42">00225</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_IPPROTO_UDP IPPROTO_UDP</span>
    226 00226 <span class="preprocessor"></span>
    227 00227 <span class="comment">//End sockets</span>
    228 00228 <span class="comment">// file IO support</span>
    229 00229 <span class="preprocessor">#if (OSCL_HAS_LARGE_FILE_SUPPORT)</span>
    230 <a name="l00230"></a><a class="code" href="osclconfig__io_8h.html#a43">00230</a> <span class="preprocessor"></span><span class="preprocessor">#define _FILE_OFFSET_BITS 64</span>
    231 <a name="l00231"></a><a class="code" href="osclconfig__io_8h.html#a48">00231</a> <span class="preprocessor"></span><span class="keyword">typedef</span> off_t <a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a>;
    232 00232 <span class="preprocessor">#else</span>
    233 00233 <span class="preprocessor"></span><span class="keyword">typedef</span> int32 <a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a>;
    234 00234 <span class="preprocessor">#endif</span>
    235 00235 <span class="preprocessor"></span>
    236 00236 <span class="preprocessor">#include "<a class="code" href="osclconfig__io__check_8h.html">osclconfig_io_check.h</a>"</span>
    237 00237 
    238 00238 <span class="preprocessor">#endif</span>
    239 00239 <span class="preprocessor"></span>
    240 </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
    241 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
    242 </small></address>
    243 </body>
    244 </html>
    245