dnxTransport.h

Go to the documentation of this file.
00001 /*--------------------------------------------------------------------------
00002  
00003    Copyright (c) 2006-2007, Intellectual Reserve, Inc. All rights reserved.
00004  
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License version 2 as 
00007    published by the Free Software Foundation.
00008  
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013  
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  
00018   --------------------------------------------------------------------------*/
00019 
00053 #ifndef _DNXTRANSPORT_H_
00054 #define _DNXTRANSPORT_H_
00055 
00056 #include <stddef.h>
00057 
00059 #define DNX_MAX_URL        1023
00060 
00062 #define DNX_MAX_MSG        4096
00063 
00065 #define DNX_MAX_ADDRESS    64
00066 
00068 #define DNX_MAX_ADDRSTR    64
00069 
00070 /* Mode values are passed in the mode parameter of dnxConnect. */
00071 #define DNX_MODE_PASSIVE   0     
00072 #define DNX_MODE_ACTIVE    1     
00073 
00074 
00075 typedef struct DnxTransStats_
00076 {
00077    unsigned reads;      
00078    unsigned writes;     
00079    unsigned rderrs;     
00080    unsigned wrerrs;     
00081 } DnxTransStats;
00082 
00084 typedef struct { int unused; } DnxChannel;
00085 
00086 int dnxChanMapAdd(char * name, char * url);
00087 void dnxChanMapDelete(char * name);
00088 
00089 int dnxConnect(char * name, int mode, DnxChannel ** channel);
00090 void dnxDisconnect(DnxChannel * channel);
00091 
00092 int dnxGet(DnxChannel * channel, char * buf, int * size, int timeout, char * src);
00093 int dnxPut(DnxChannel * channel, char * buf, int size, int timeout, char * dst);
00094 
00095 void dnxGetStats(DnxChannel * channel, DnxTransStats * tsp);
00096 void dnxResetStats(DnxChannel * channel);
00097 
00098 int dnxChanMapInit(char * fileName);
00099 void dnxChanMapRelease(void);
00100 
00101 char * dnxNtop(const void * sastr, char * buf, size_t bufsz);
00102 
00103 #endif   /* _DNXTRANSPORT_H_ */
00104 

Generated on Tue Apr 13 15:48:07 2010 for DNX by  doxygen 1.5.6