/home/hillier_g/checkout/most4linux/libnetservices/include/linux/mostnetsdll.h

00001 /*
00002  *  Copyright(c) Siemens AG, Muenchen, Germany, 2005, 2006, 2007
00003  *                           Bernhard Walle <bernhard.walle@gmx.de>
00004  *                           Gernot Hillier <gernot.hillier@siemens.com>
00005  *                           All rights reserved.
00006  *
00007  * ----------------------------------------------------------------------------
00008  * The contents of this file are subject to the Mozilla Public License
00009  * Version 1.1 (the "License"); you may not use this file except in
00010  * compliance with the License. You may obtain a copy of the License at
00011  * http://www.mozilla.org/MPL/
00012  * 
00013  * Software distributed under the License is distributed on an "AS IS"
00014  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
00015  * License for the specific language governing rights and limitations
00016  * under the License.
00017  *
00018  * The Original Code is Siemens code.
00019  * 
00020  * The Initial Developer of the Original Code is Siemens AG.
00021  * Portions created by the Initial Developer are Copyright (C) 2005-06
00022  * the Initial Developer. All Rights Reserved.
00023  * ----------------------------------------------------------------------------
00024  */
00025 #ifndef MOSTNETSDLL_H
00026 #define MOSTNETSDLL_H
00027 
00031 #define CLIENT_NAME_MAX         32
00032 
00037 enum TErrorCode {
00038     E_SUCCESS        = 0,   
00039     E_INVALID_ARG    = -1,  
00040     E_INVALID_GLOBAL = -3,  
00042     E_OPEN_DRIVER    = -4,  
00043     E_SIGNAL         = -5,  
00045     E_THREAD         = -6,  
00046     E_IOCTL          = -7   
00048 };
00049 
00054 enum TBusType {
00055     BUS_TYPE_ISA,           
00056     BUS_TYPE_PCI,           
00057     BUS_TYPE_SER,           
00058     BUS_TYPE_SIM            
00059 };
00060 
00067 extern enum TBusType        BusType;
00068 
00075 extern int                  InstID;
00076 
00084 extern bool                 UseMsgInterface;
00085 
00092 extern char                 ClientName[CLIENT_NAME_MAX];
00093 
00108 short OpenNetServices(void);
00109 
00113 void CloseNetServices(void);
00114 
00120 void MostStartUpFinished(void);
00121 
00128 void MostStartUpOriginal(byte mode, byte opt);
00129 
00138 #define MostStartUp(mode, opt)                                          \
00139         do {                                                            \
00140             MostStartUpOriginal((mode), (opt));                         \
00141             MostStartUpFinished();                                      \
00142         } while (0);
00143 
00147 void LinuxPrintRoutingTable(void);
00148 
00149 /*
00150  * In the main file, declare the global variables.
00151  */
00152 #ifdef _CLIENT_MAIN
00153 enum TBusType       BusType;
00154 int                 InstID;
00155 bool                UseMsgInterface;
00156 char                ClientName[CLIENT_NAME_MAX];
00157 #endif
00158 
00159 #endif /* MOSTNETSDLL_H */
00160 
00161 /* vim: set ts=4 et sw=4: */

Generated on Fri Mar 9 14:48:58 2007 for MOST Adaption Layer for Netservices Library by  doxygen 1.5.0