diff options
author | ramon <ramongomez@us.es> | 2009-06-16 14:30:24 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2009-06-16 14:30:24 +0000 |
commit | 467c55190a714f6fa50632d8554fae383528816e (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /doc | |
parent | 58e71956e4681701d0bfc603971cc37c82c534c7 (diff) |
Estructura básica de OpenGNSys.
git-svn-id: https://opengnsys.es/svn/trunk@71 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'doc')
-rw-r--r-- | doc/html/Database_8h-source.html | 80 | ||||
-rw-r--r-- | doc/html/doxygen.css | 433 | ||||
-rw-r--r-- | doc/html/doxygen.png | bin | 1281 -> 0 bytes | |||
-rw-r--r-- | doc/html/encriptacion_8h-source.html | 34 | ||||
-rw-r--r-- | doc/html/files.html | 30 | ||||
-rw-r--r-- | doc/html/hidra_8h-source.html | 258 | ||||
-rw-r--r-- | doc/html/hidraboot_8h-source.html | 298 | ||||
-rw-r--r-- | doc/html/hidrac_8h-source.html | 309 | ||||
-rw-r--r-- | doc/html/hidrarepos_8h-source.html | 153 | ||||
-rw-r--r-- | doc/html/index.html | 24 | ||||
-rw-r--r-- | doc/html/tab_b.gif | bin | 35 -> 0 bytes | |||
-rw-r--r-- | doc/html/tab_l.gif | bin | 706 -> 0 bytes | |||
-rw-r--r-- | doc/html/tab_r.gif | bin | 2585 -> 0 bytes | |||
-rw-r--r-- | doc/html/tabs.css | 102 |
14 files changed, 0 insertions, 1721 deletions
diff --git a/doc/html/Database_8h-source.html b/doc/html/Database_8h-source.html deleted file mode 100644 index 239574e6..00000000 --- a/doc/html/Database_8h-source.html +++ /dev/null @@ -1,80 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Fichero Fuente Hidra/includes/Database.h</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -<h1>Hidra/includes/Database.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ******************************************************************************************************</span> -<a name="l00002"></a>00002 <span class="comment">// Aplicaci� HIDRA</span> -<a name="l00003"></a>00003 <span class="comment">// Copyright 2004 Jos�Manuel Alonso. Todos los derechos reservados.</span> -<a name="l00004"></a>00004 <span class="comment">// Fichero: Database.h</span> -<a name="l00005"></a>00005 <span class="comment">// Descripci�:</span> -<a name="l00006"></a>00006 <span class="comment">// Fichero de cabecera de la clase Database para implementar funciones de manipulaci�</span> -<a name="l00007"></a>00007 <span class="comment">// de bases de datos sobre un Servidor Mysql</span> -<a name="l00008"></a>00008 <span class="comment">// ******************************************************************************************************</span> -<a name="l00009"></a>00009 <span class="preprocessor">#include <stdio.h></span> -<a name="l00010"></a>00010 <span class="preprocessor">#include <stdlib.h></span> -<a name="l00011"></a>00011 <span class="preprocessor">#include <string.h></span> -<a name="l00012"></a>00012 <span class="preprocessor">#include </usr/include/mysql/mysql.h></span> -<a name="l00013"></a>00013 <span class="comment">// __________________________________________________________________________</span> -<a name="l00014"></a>00014 <span class="keyword">class </span>Database; -<a name="l00015"></a>00015 <span class="keyword">class </span>Table; -<a name="l00016"></a>00016 <span class="comment">// __________________________________________________________________________</span> -<a name="l00017"></a>00017 <span class="keyword">class </span>Database -<a name="l00018"></a>00018 { -<a name="l00019"></a>00019 <span class="keyword">public</span>: -<a name="l00020"></a>00020 MYSQL *m_Cnn; -<a name="l00021"></a>00021 <span class="keywordtype">char</span> m_ErrStr[500]; -<a name="l00022"></a>00022 Database(); -<a name="l00023"></a>00023 <span class="keywordtype">bool</span> Open(<span class="keywordtype">char</span>* UserName, <span class="keywordtype">char</span>* Pwd,<span class="keywordtype">char</span>* server,<span class="keywordtype">char</span>*Database); -<a name="l00024"></a>00024 <span class="keywordtype">bool</span> OpenTbl(<span class="keywordtype">int</span> Mode, <span class="keywordtype">char</span>* CmdStr, Table& Tbl); -<a name="l00025"></a>00025 <span class="keywordtype">bool</span> Close(<span class="keywordtype">void</span>); -<a name="l00026"></a>00026 <span class="keywordtype">bool</span> Execute(<span class="keywordtype">char</span>* CmdStr); -<a name="l00027"></a>00027 <span class="keywordtype">bool</span> Execute(<span class="keywordtype">char</span>* CmdStr, Table& Tbl); -<a name="l00028"></a>00028 <span class="keywordtype">void</span> GetErrorErrStr(<span class="keywordtype">char</span>* ErrStr); -<a name="l00029"></a>00029 }; -<a name="l00030"></a>00030 <span class="comment">// __________________________________________________________________________</span> -<a name="l00031"></a>00031 <span class="keyword">class </span>Table{ -<a name="l00032"></a>00032 <span class="keywordtype">char</span>* tomadato(<span class="keywordtype">char</span>* FieldName); -<a name="l00033"></a>00033 <span class="keyword">public</span>: -<a name="l00034"></a>00034 <span class="keywordtype">bool</span> eof,bof; -<a name="l00035"></a>00035 MYSQL_RES * m_Rec ; -<a name="l00036"></a>00036 MYSQL_FIELD *fields; -<a name="l00037"></a>00037 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_fields; -<a name="l00038"></a>00038 MYSQL_ROW row ; -<a name="l00039"></a>00039 MYSQL_ROW_OFFSET ptr; -<a name="l00040"></a>00040 my_ulonglong numreg; -<a name="l00041"></a>00041 <span class="keywordtype">char</span> m_ErrStr[500]; -<a name="l00042"></a>00042 Table(); -<a name="l00043"></a>00043 <span class="keywordtype">void</span> GetErrorErrStr(<span class="keywordtype">char</span>* ErrStr); -<a name="l00044"></a>00044 <span class="keywordtype">bool</span> ISEOF(); -<a name="l00045"></a>00045 <span class="keywordtype">bool</span> MoveNext(); -<a name="l00046"></a>00046 <span class="keywordtype">bool</span> MovePrevious(); -<a name="l00047"></a>00047 <span class="keywordtype">bool</span> MoveFirst(); -<a name="l00048"></a>00048 <span class="keywordtype">bool</span> MoveLast(); -<a name="l00049"></a>00049 -<a name="l00050"></a>00050 <span class="keywordtype">bool</span> Get(<span class="keywordtype">char</span>* FieldName, <span class="keywordtype">char</span>* FieldValue); -<a name="l00051"></a>00051 <span class="keywordtype">bool</span> Get(<span class="keywordtype">char</span>* FieldName,<span class="keywordtype">int</span> &FieldValue); -<a name="l00052"></a>00052 <span class="keywordtype">bool</span> Get(<span class="keywordtype">char</span>* FieldName,<span class="keywordtype">char</span> &FieldValue); -<a name="l00053"></a>00053 }; -<a name="l00054"></a>00054 <span class="comment">// __________________________________________________________________________</span> -<a name="l00055"></a>00055 <span class="keyword">class </span>Herror -<a name="l00056"></a>00056 { -<a name="l00057"></a>00057 <span class="keyword">public</span>: -<a name="l00058"></a>00058 <span class="keywordtype">int</span> nError; <span class="comment">// C�igo del error</span> -<a name="l00059"></a>00059 <span class="keywordtype">char</span> dError[500]; <span class="comment">// Descripci� del error</span> -<a name="l00060"></a>00060 }; -</pre></div></div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css deleted file mode 100644 index 74c22a2f..00000000 --- a/doc/html/doxygen.css +++ /dev/null @@ -1,433 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} - diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png Binary files differdeleted file mode 100644 index f0a274bb..00000000 --- a/doc/html/doxygen.png +++ /dev/null diff --git a/doc/html/encriptacion_8h-source.html b/doc/html/encriptacion_8h-source.html deleted file mode 100644 index 167b2178..00000000 --- a/doc/html/encriptacion_8h-source.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Fichero Fuente Hidra/includes/encriptacion.h</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -<h1>Hidra/includes/encriptacion.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ********************************************************************************************************************************************************</span> -<a name="l00002"></a>00002 <span class="comment">// Aplicacin HIDRA</span> -<a name="l00003"></a>00003 <span class="comment">// Copyright 2003-2005 Jos Manuel Alonso. Todos los derechos reservados.</span> -<a name="l00004"></a>00004 <span class="comment">// Fichero: encriptacion.h</span> -<a name="l00005"></a>00005 <span class="comment">// Descripcin:</span> -<a name="l00006"></a>00006 <span class="comment">// Este proyecto implementa el servicio hidra en un ordenador con plataforma windows NT. Este fichero aporta las funciones de </span> -<a name="l00007"></a>00007 <span class="comment">// encriptacin para las comunicaciones a travs de la red.</span> -<a name="l00008"></a>00008 <span class="comment">// *********************************************************************************************************************************************************</span> -<a name="l00009"></a>00009 <span class="comment">//_____________________________________________________________________________________________________________</span> -<a name="l00010"></a>00010 <span class="comment">//</span> -<a name="l00011"></a>00011 <span class="preprocessor">#include <string.h></span> -<a name="l00012"></a>00012 -<a name="l00013"></a>00013 <span class="keywordtype">char</span> * Desencriptar(<span class="keywordtype">char</span> *); -<a name="l00014"></a>00014 <span class="keywordtype">char</span> * Encriptar(<span class="keywordtype">char</span> *); -</pre></div></div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/files.html b/doc/html/files.html deleted file mode 100644 index 2e77cb94..00000000 --- a/doc/html/files.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Indice de archivos</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -</div> -<div class="contents"> -<h1>Lista de archivos</h1>Lista de todos los archivos documentados y con descripciones breves:<table> - <tr><td class="indexkey">Hidra/hidra/fuentes/<b>hidra.h</b> <a href="hidra_8h-source.html">[código]</a></td><td class="indexvalue"></td></tr> - <tr><td class="indexkey">Hidra/hidraboot/fuentes/<b>hidraboot.h</b> <a href="hidraboot_8h-source.html">[código]</a></td><td class="indexvalue"></td></tr> - <tr><td class="indexkey">Hidra/hidrac/fuentes/<b>hidrac.h</b> <a href="hidrac_8h-source.html">[código]</a></td><td class="indexvalue"></td></tr> - <tr><td class="indexkey">Hidra/hidrarepos/fuentes/<b>hidrarepos.h</b> <a href="hidrarepos_8h-source.html">[código]</a></td><td class="indexvalue"></td></tr> - <tr><td class="indexkey">Hidra/includes/<b>Database.h</b> <a href="Database_8h-source.html">[código]</a></td><td class="indexvalue"></td></tr> - <tr><td class="indexkey">Hidra/includes/<b>encriptacion.h</b> <a href="encriptacion_8h-source.html">[código]</a></td><td class="indexvalue"></td></tr> -</table> -</div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/hidra_8h-source.html b/doc/html/hidra_8h-source.html deleted file mode 100644 index 4ee733e5..00000000 --- a/doc/html/hidra_8h-source.html +++ /dev/null @@ -1,258 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Fichero Fuente Hidra/hidra/fuentes/hidra.h</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -<h1>Hidra/hidra/fuentes/hidra.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ****************************************************************************************************************************************************</span> -<a name="l00002"></a>00002 <span class="comment">// Aplicaci� HIDRA</span> -<a name="l00003"></a>00003 <span class="comment">// Copyright 2003-2005 Jos�Manuel Alonso. Todos los derechos reservados.</span> -<a name="l00004"></a>00004 <span class="comment">// Fichero: hidra.h</span> -<a name="l00005"></a>00005 <span class="comment">// Descripci�:</span> -<a name="l00006"></a>00006 <span class="comment">// Este proyecto implementa el servicio hidra en un ordenador con plataforma windows NT. Este fichero aporta las funciones de </span> -<a name="l00007"></a>00007 <span class="comment">// env� de comandos y recepci� de respuestas</span> -<a name="l00008"></a>00008 <span class="comment">// *****************************************************************************************************************************************************</span> -<a name="l00009"></a>00009 <span class="preprocessor">#include <sys/types.h></span> -<a name="l00010"></a>00010 <span class="preprocessor">#include <sys/socket.h></span> -<a name="l00011"></a>00011 <span class="preprocessor">#include <netinet/in.h></span> -<a name="l00012"></a>00012 <span class="preprocessor">#include <arpa/inet.h></span> -<a name="l00013"></a>00013 <span class="preprocessor">#include <stdio.h></span> -<a name="l00014"></a>00014 <span class="preprocessor">#include <stdlib.h></span> -<a name="l00015"></a>00015 <span class="preprocessor">#include <string.h></span> -<a name="l00016"></a>00016 <span class="preprocessor">#include <errno.h></span> -<a name="l00017"></a>00017 <span class="preprocessor">#include <unistd.h></span> -<a name="l00018"></a>00018 <span class="preprocessor">#include <time.h></span> -<a name="l00019"></a>00019 <span class="preprocessor">#include <ctype.h></span> -<a name="l00020"></a>00020 <span class="preprocessor">#include </usr/include/mysql/mysql.h></span> -<a name="l00021"></a>00021 <span class="preprocessor">#include <pthread.h></span> -<a name="l00022"></a>00022 <span class="preprocessor">#include "Database.h"</span> -<a name="l00023"></a>00023 -<a name="l00024"></a>00024 <span class="preprocessor">#define LONGITUD_PARAMETROS 4000 // Longitud m�ima de la informaci� de la trama (parametros)</span> -<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define LONGITUD_TRAMA LONGITUD_PARAMETROS+11 // Longitud m�ima de la trama completa</span> -<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define MAXCMD_PARAMETROS 200 // M�imo numero de par�etros de una trama de comandos</span> -<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define MAXIMOS_SOCKETS 4000 // M�imo numero de conexiones con ordenadores clientes</span> -<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define MAXIMOS_SRVRMB 200 // Maximo numero de servidores rembo</span> -<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define MAXLON_PARAMETROSIPH 3000 // M�ima longitud de un parametro iph</span> -<a name="l00030"></a>00030 <span class="preprocessor"></span> -<a name="l00031"></a>00031 <span class="preprocessor">#define MAX_INTERFACE_LIST 20</span> -<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define MAX_NUM_CSADDRS 20</span> -<a name="l00033"></a>00033 <span class="preprocessor"></span> -<a name="l00034"></a>00034 <span class="preprocessor">#define MAXHARDWARE 30 // mÁXIMOS ELEMENTOS HARDSWARE A DETECTAR</span> -<a name="l00035"></a>00035 <span class="preprocessor"></span> -<a name="l00036"></a>00036 <span class="preprocessor">#define PUERTOMINUSER 40000</span> -<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define PUERTOMAXUSER 60000</span> -<a name="l00038"></a>00038 <span class="preprocessor"></span> -<a name="l00039"></a>00039 <span class="preprocessor">#define LITAMBITO_CENTROS "centros"</span> -<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define LITAMBITO_GRUPOSAULAS "gruposaulas"</span> -<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define LITAMBITO_AULAS "aulas"</span> -<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define LITAMBITO_GRUPOSORDENADORES "gruposordenadores"</span> -<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define LITAMBITO_ORDENADORES "ordenadores"</span> -<a name="l00044"></a>00044 <span class="preprocessor"></span> -<a name="l00045"></a>00045 <span class="preprocessor">#define ACCION_EXITOSA "1" // Finalizada con exito</span> -<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_FALLIDA "2" // Finalizada con errores</span> -<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_TERMINADA "3" // Finalizada manualmente con indicacion de exito </span> -<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_ABORTADA "4" // Finalizada manualmente con indicacion de errores </span> -<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_SINERRORES "5" // Activa y sin ningn error</span> -<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_CONERRORES "6" // Activa y con algn error</span> -<a name="l00051"></a>00051 <span class="preprocessor"></span> -<a name="l00052"></a>00052 <span class="preprocessor">#define ACCION_DETENIDA "0" // Acci� momentanemente parada</span> -<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_INICIADA "1" // Acci� activa</span> -<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define ACCION_FINALIZADA "2" // Accion finalizada</span> -<a name="l00055"></a>00055 <span class="preprocessor"></span> -<a name="l00056"></a>00056 <span class="preprocessor">#define PROCESOS 0x01</span> -<a name="l00057"></a>00057 <span class="preprocessor"></span> -<a name="l00058"></a>00058 <span class="preprocessor">#define EJECUCION_PROCEDIMIENTO 0x0000 // Accion Procedimiento</span> -<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define EJECUCION_COMANDO 0x0001 // Accion Comando</span> -<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define EJECUCION_TAREA 0x0002 // Accion Tarea</span> -<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define EJECUCION_TRABAJO 0x0003 // Accion Trabajo</span> -<a name="l00062"></a>00062 <span class="preprocessor"></span> -<a name="l00063"></a>00063 <span class="preprocessor">#define EJECUTOR_servidorHIDRA 0x0001 // Ejecutor Servidor hidra</span> -<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define EJECUTOR_clienteREMBO 0x0002 // Ejecutor cliente rembo</span> -<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define EJECUTOR_servidorREMBO 0x0003 // Ejecutor Servidor rembo</span> -<a name="l00066"></a>00066 <span class="preprocessor"></span> -<a name="l00067"></a>00067 <span class="preprocessor">#define CLIENTE_REMBO "RMB" // Sistema operativo Rembo</span> -<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define CLIENTE_OCUPADO "BSY" // Cliente ocupado</span> -<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define CLIENTE_APAGADO "OFF" // Cliente apagado</span> -<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define CLIENTE_INICIANDO "INI" // Cliente iniciando</span> -<a name="l00071"></a>00071 <span class="preprocessor"></span> -<a name="l00072"></a>00072 <span class="preprocessor">#define AUTOINCORPORACION_OFF 0x0000 // Los ordenadores no se pueden dar de alta autm�icamente</span> -<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define AUTOINCORPORACION_ONA 0x0001 // Los ordenadores se pueden dar de alta autom�icamente si existe el aula</span> -<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define AUTOINCORPORACION_ONX 0x0002 // Los ordenadores se pueden dar de alta autom�icamente y si no existe el aula la crea</span> -<a name="l00075"></a>00075 <span class="preprocessor"></span> -<a name="l00076"></a>00076 <span class="preprocessor">#define MAX_NUM_CSADDRS 20</span> -<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define MAX_INTERFACE_LIST 20</span> -<a name="l00078"></a>00078 <span class="preprocessor"></span> -<a name="l00079"></a>00079 <span class="preprocessor">#define TRUE 1</span> -<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span> -<a name="l00081"></a>00081 <span class="preprocessor"></span> -<a name="l00082"></a>00082 <span class="preprocessor">#define true 1</span> -<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define false 0</span> -<a name="l00084"></a>00084 <span class="preprocessor"></span> -<a name="l00085"></a>00085 <span class="preprocessor">#define SOCKET_ERROR (-1)</span> -<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define INVALID_SOCKET (SOCKET)(~0)</span> -<a name="l00087"></a>00087 <span class="preprocessor"></span> -<a name="l00088"></a>00088 <span class="comment">// __________________________________________________________________________________________________________</span> -<a name="l00089"></a>00089 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> DWORD; -<a name="l00090"></a>00090 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> WORD; -<a name="l00091"></a>00091 <span class="keyword">typedef</span> <span class="keywordtype">int</span> BOOLEAN; -<a name="l00092"></a>00092 <span class="keyword">typedef</span> <span class="keywordtype">char</span> BYTE; -<a name="l00093"></a>00093 <span class="keyword">typedef</span> <span class="keywordtype">int</span> SOCKET; -<a name="l00094"></a>00094 <span class="comment">// __________________________________________________________________________________________________________</span> -<a name="l00095"></a>00095 -<a name="l00096"></a>00096 <span class="keywordtype">char</span> szPathFile[128],szPathFileCfg[128]; -<a name="l00097"></a>00097 FILE *FLog,*Fconfig; -<a name="l00098"></a>00098 <span class="keywordtype">char</span> AulaUp[2]; -<a name="l00099"></a>00099 <span class="keywordtype">int</span> aulaup; <span class="comment">// Switch para permitir que un ordenador se de de alta autom�icamente en un aula existenta</span> -<a name="l00100"></a>00100 <span class="comment">// Valores:</span> -<a name="l00101"></a>00101 <span class="comment">// 0: El ordenador No se da de alta autom�icamente en un aula</span> -<a name="l00102"></a>00102 <span class="comment">// 1: El ordenador se da de alta en un aula si existe</span> -<a name="l00103"></a>00103 <span class="comment">// 2: El ordenador se da de alta en un aula si existe y si no existe la crea para darse de alta</span> -<a name="l00104"></a>00104 -<a name="l00105"></a>00105 <span class="keywordtype">char</span> IPlocal[20]; <span class="comment">// Ip local</span> -<a name="l00106"></a>00106 <span class="keywordtype">char</span> servidorhidra[20]; <span class="comment">// IP servidor HIDRA</span> -<a name="l00107"></a>00107 <span class="keywordtype">char</span> Puerto[20]; <span class="comment">// Puerto Unicode</span> -<a name="l00108"></a>00108 <span class="keywordtype">int</span> puerto; <span class="comment">// Puerto</span> -<a name="l00109"></a>00109 <span class="keywordtype">char</span> usuario[20]; -<a name="l00110"></a>00110 <span class="keywordtype">char</span> pasguor[20]; -<a name="l00111"></a>00111 <span class="keywordtype">char</span> datasource[20]; -<a name="l00112"></a>00112 <span class="keywordtype">char</span> catalog[50]; -<a name="l00113"></a>00113 -<a name="l00114"></a>00114 <span class="keyword">typedef</span> <span class="keyword">struct</span>{ <span class="comment">// Estructura de la trama recibida</span> -<a name="l00115"></a>00115 <span class="keywordtype">char</span> arroba; <span class="comment">// Caracter arroba siempre</span> -<a name="l00116"></a>00116 <span class="keywordtype">char</span> identificador[9]; <span class="comment">// Identificador de la trama, siempre JMMLCAMDJ:</span> -<a name="l00117"></a>00117 <span class="keywordtype">char</span> ejecutor; <span class="comment">// Identificador del encargado de ejecutar la funci� ( 1= Servidor 2=Cliente rembo:</span> -<a name="l00118"></a>00118 <span class="keywordtype">char</span> parametros[LONGITUD_PARAMETROS]; <span class="comment">// Contenido de la trama (par�etros)</span> -<a name="l00119"></a>00119 }TRAMA; -<a name="l00120"></a>00120 -<a name="l00121"></a>00121 <span class="keyword">struct </span>s_socketCLRMB{ <span class="comment">// Estructura usada para guardar informaci� de los clientes</span> -<a name="l00122"></a>00122 <span class="keywordtype">char</span> ip[16]; <span class="comment">// IP del cliente</span> -<a name="l00123"></a>00123 <span class="keywordtype">char</span> estado[4]; <span class="comment">// Tipo de sistema Operativo del cliente "RMB"=rembo,"W98"=windows98,"W2K"=windows 2000, etc</span> -<a name="l00124"></a>00124 SOCKET sock; <span class="comment">// Socket por el que se comunica</span> -<a name="l00125"></a>00125 <span class="keywordtype">char</span> ipsrvdhcp[16]; <span class="comment">// IP del servidor dhcp</span> -<a name="l00126"></a>00126 <span class="keywordtype">char</span> ipsrvrmb[16]; <span class="comment">// IP del servidor rembo</span> -<a name="l00127"></a>00127 }; -<a name="l00128"></a>00128 <span class="keyword">struct </span>s_socketCLRMB tbsockets[MAXIMOS_SOCKETS]; -<a name="l00129"></a>00129 -<a name="l00130"></a>00130 <span class="keyword">struct </span>s_socketSRVRMB{ <span class="comment">// Estructura usada para guardar informaci� de los servidores REMBO</span> -<a name="l00131"></a>00131 <span class="keywordtype">char</span> ip[16]; <span class="comment">// IP del servidor rembo</span> -<a name="l00132"></a>00132 <span class="keywordtype">int</span> puertorepo; -<a name="l00133"></a>00133 <span class="keywordtype">char</span> ipes[MAXLON_PARAMETROSIPH]; <span class="comment">// IP de los clientes rembo</span> -<a name="l00134"></a>00134 <span class="keywordtype">int</span> swenv; <span class="comment">// Switch de envio</span> -<a name="l00135"></a>00135 -<a name="l00136"></a>00136 }; -<a name="l00137"></a>00137 <span class="keyword">struct </span>s_socketSRVRMB tbsocketsSRVRMB[MAXIMOS_SRVRMB]; -<a name="l00138"></a>00138 -<a name="l00139"></a>00139 <span class="keyword">static</span> pthread_mutex_t guardia; <span class="comment">// Controla acceso exclusivo de hebras </span> -<a name="l00140"></a>00140 -<a name="l00141"></a>00141 <span class="comment">// Prototipo de funciones</span> -<a name="l00142"></a>00142 <span class="keywordtype">void</span>* GestionaConexion(<span class="keywordtype">void</span>*); -<a name="l00143"></a>00143 <span class="keywordtype">void</span> gestiona_comando(SOCKET s,TRAMA trama); -<a name="l00144"></a>00144 <span class="keywordtype">int</span> manda_comando(SOCKET sock,<span class="keywordtype">char</span>* parametros); -<a name="l00145"></a>00145 <span class="keywordtype">int</span> manda_trama(SOCKET sock,TRAMA* trama); -<a name="l00146"></a>00146 <span class="keywordtype">int</span> recibe_trama(SOCKET sock,TRAMA* trama); -<a name="l00147"></a>00147 <span class="keywordtype">int</span> manda_trama_servidorrembo(<span class="keywordtype">char</span>* ,<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>); -<a name="l00148"></a>00148 -<a name="l00149"></a>00149 SOCKET UDPConnect(<span class="keywordtype">char</span> *); -<a name="l00150"></a>00150 <span class="keywordtype">int</span> envia_comandos(SOCKET ,TRAMA* , <span class="keywordtype">char</span>* ,<span class="keywordtype">int</span>); -<a name="l00151"></a>00151 -<a name="l00152"></a>00152 -<a name="l00153"></a>00153 <span class="keywordtype">int</span> hay_hueco(<span class="keywordtype">int</span> *); -<a name="l00154"></a>00154 BOOLEAN cliente_existente(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>*); -<a name="l00155"></a>00155 <span class="keywordtype">int</span> hay_huecoservidorrembo(<span class="keywordtype">int</span> *); -<a name="l00156"></a>00156 BOOLEAN servidorrembo_existente(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>*); -<a name="l00157"></a>00157 BOOLEAN IgualIP(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00158"></a>00158 -<a name="l00159"></a>00159 <span class="keywordtype">void</span> INTROaFINCAD(<span class="keywordtype">char</span>* ); -<a name="l00160"></a>00160 <span class="keywordtype">void</span> FINCADaINTRO(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00161"></a>00161 -<a name="l00162"></a>00162 <span class="keywordtype">int</span> cuenta_ipes(<span class="keywordtype">char</span>*); -<a name="l00163"></a>00163 <span class="keywordtype">char</span> * toma_parametro(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span> *); -<a name="l00164"></a>00164 <span class="keywordtype">char</span> * corte_iph(<span class="keywordtype">char</span> *); -<a name="l00165"></a>00165 -<a name="l00166"></a>00166 <span class="keywordtype">int</span> respuesta_cortesia(SOCKET ); -<a name="l00167"></a>00167 <span class="keywordtype">int</span> NoComandosPendientes(SOCKET); -<a name="l00168"></a>00168 <span class="keywordtype">int</span> Coloca_estado(<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,SOCKET); -<a name="l00169"></a>00169 <span class="keywordtype">int</span> actualiza_configuracion(Database , Table ,<span class="keywordtype">char</span>* ,<span class="keywordtype">int</span>,<span class="keywordtype">int</span> ,<span class="keywordtype">char</span>* ); -<a name="l00170"></a>00170 <span class="keywordtype">int</span> actualiza_hardware(Database , Table ,<span class="keywordtype">char</span>* ,<span class="keywordtype">char</span>* ,<span class="keywordtype">char</span>*); -<a name="l00171"></a>00171 <span class="keywordtype">int</span> CuestrionPerfilHardware(Database , Table ,<span class="keywordtype">int</span> ,<span class="keywordtype">char</span>* ,<span class="keywordtype">int</span> *,<span class="keywordtype">int</span> ,<span class="keywordtype">char</span>*); -<a name="l00172"></a>00172 <span class="keywordtype">void</span> TomaParticiones(<span class="keywordtype">char</span>*, <span class="keywordtype">char</span>* ,<span class="keywordtype">int</span> ); -<a name="l00173"></a>00173 <span class="keywordtype">int</span> Toma_menu(Database,Table,<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>,<span class="keywordtype">int</span>); -<a name="l00174"></a>00174 <span class="keywordtype">int</span> RecuperaItem(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00175"></a>00175 <span class="keywordtype">int</span> ComandosPendientes(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00176"></a>00176 <span class="keywordtype">int</span> procesaCOMANDOS(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00177"></a>00177 <span class="keywordtype">int</span> DisponibilidadComandos(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00178"></a>00178 -<a name="l00179"></a>00179 <span class="keywordtype">int</span> InclusionClienteHIDRA(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00180"></a>00180 <span class="keywordtype">int</span> inclusion_srvRMB(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>); -<a name="l00181"></a>00181 <span class="keywordtype">int</span> inclusion_REPO(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00182"></a>00182 <span class="keywordtype">int</span> inclusion_cliWINLNX(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00183"></a>00183 -<a name="l00184"></a>00184 <span class="keywordtype">int</span> Sondeo(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00185"></a>00185 <span class="keywordtype">int</span> Arrancar(<span class="keywordtype">char</span> *); -<a name="l00186"></a>00186 <span class="keywordtype">int</span> Actualizar(<span class="keywordtype">char</span> *); -<a name="l00187"></a>00187 <span class="keywordtype">int</span> FicheroOperador(<span class="keywordtype">char</span> *); -<a name="l00188"></a>00188 <span class="keywordtype">int</span> IconoItem(TRAMA*); -<a name="l00189"></a>00189 <span class="keywordtype">int</span> Conmutar(<span class="keywordtype">char</span> *); -<a name="l00190"></a>00190 <span class="keywordtype">int</span> RenovarItems(<span class="keywordtype">char</span> *); -<a name="l00191"></a>00191 -<a name="l00192"></a>00192 SOCKET AbreConexion(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>); -<a name="l00193"></a>00193 <span class="keywordtype">void</span> RegistraLog(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>); -<a name="l00194"></a>00194 -<a name="l00195"></a>00195 <span class="keywordtype">void</span> PurgarTablaSockets(<span class="keywordtype">char</span> *); -<a name="l00196"></a>00196 <span class="keywordtype">int</span> borra_entrada(<span class="keywordtype">int</span>); -<a name="l00197"></a>00197 <span class="keywordtype">int</span> RESPUESTA_Arrancar(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00198"></a>00198 <span class="keywordtype">int</span> RESPUESTA_Apagar(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00199"></a>00199 <span class="keywordtype">int</span> RESPUESTA_RemboOffline(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00200"></a>00200 <span class="keywordtype">int</span> RESPUESTA_Reiniciar(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00201"></a>00201 <span class="keywordtype">int</span> RESPUESTA_Actualizar(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00202"></a>00202 <span class="keywordtype">int</span> RESPUESTA_ExecShell(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00203"></a>00203 <span class="keywordtype">int</span> RespuestaEstandar(<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span>*,Database, Table); -<a name="l00204"></a>00204 <span class="keywordtype">int</span> RESPUESTA_CrearPerfilSoftware(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00205"></a>00205 <span class="keywordtype">int</span> RESPUESTA_CrearSoftwareIncremental(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00206"></a>00206 <span class="keywordtype">int</span> RESPUESTA_RestaurarImagen(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00207"></a>00207 <span class="keywordtype">int</span> RESPUESTA_ParticionaryFormatear(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00208"></a>00208 <span class="keywordtype">int</span> RESPUESTA_Configurar(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00209"></a>00209 <span class="keywordtype">int</span> RESPUESTA_TomaConfiguracion(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00210"></a>00210 <span class="keywordtype">int</span> RESPUESTA_TomaHardware(SOCKET ,<span class="keywordtype">char</span> *); -<a name="l00211"></a>00211 -<a name="l00212"></a>00212 <span class="keywordtype">int</span> RESPUESTA_inclusionREPO(TRAMA*); -<a name="l00213"></a>00213 -<a name="l00214"></a>00214 <span class="keywordtype">int</span> Actualiza_ordenador_imagen(<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,Database); -<a name="l00215"></a>00215 -<a name="l00216"></a>00216 <span class="keywordtype">int</span> busca_comandos(<span class="keywordtype">char</span>* ,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span> *,<span class="keywordtype">int</span> *); -<a name="l00217"></a>00217 <span class="keywordtype">int</span> InsertaNotificaciones(<span class="keywordtype">int</span>,<span class="keywordtype">int</span>,<span class="keywordtype">int</span>,<span class="keywordtype">char</span> *,Database); -<a name="l00218"></a>00218 <span class="keywordtype">int</span> comprueba_resultados(<span class="keywordtype">int</span> ,Database ); -<a name="l00219"></a>00219 <span class="keywordtype">int</span> comprueba_finalizada(<span class="keywordtype">int</span> ,<span class="keywordtype">char</span> *,Database ); -<a name="l00220"></a>00220 -<a name="l00221"></a>00221 <span class="keywordtype">void</span> EnviaServidoresRembo(<span class="keywordtype">char</span>*); -<a name="l00222"></a>00222 <span class="keywordtype">void</span> DesmarcaServidoresRembo(<span class="keywordtype">void</span>); -<a name="l00223"></a>00223 <span class="keywordtype">void</span> MarcaServidoresRembo(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00224"></a>00224 -<a name="l00225"></a>00225 <span class="keywordtype">int</span> EjecutarItem(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00226"></a>00226 BOOLEAN TomaIPServidorRembo(<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>*); -<a name="l00227"></a>00227 -<a name="l00228"></a>00228 <span class="keywordtype">void</span> envia_tarea(<span class="keywordtype">char</span>* ); -<a name="l00229"></a>00229 <span class="keywordtype">int</span> EjecutarTarea(<span class="keywordtype">int</span> ,<span class="keywordtype">int</span> ,<span class="keywordtype">int</span> ,<span class="keywordtype">int</span> , Database,<span class="keywordtype">char</span> * ); -<a name="l00230"></a>00230 <span class="keywordtype">int</span> EjecutarTrabajo(<span class="keywordtype">int</span> ,Database,<span class="keywordtype">char</span> * ); -<a name="l00231"></a>00231 <span class="keywordtype">int</span> cuestion_nuevoordenador(Database,Table ,<span class="keywordtype">int</span>*,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00232"></a>00232 <span class="keywordtype">int</span> alta_ordenador(Database db,Table tbl,<span class="keywordtype">int</span>*,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *,<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>,<span class="keywordtype">int</span>,<span class="keywordtype">int</span>); -<a name="l00233"></a>00233 <span class="keywordtype">int</span> Toma_idservidorres(Database ,Table ,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>*,<span class="keywordtype">int</span>*); -<a name="l00234"></a>00234 -<a name="l00235"></a>00235 <span class="keywordtype">void</span> cambiacarac(<span class="keywordtype">char</span> *,<span class="keywordtype">char</span> , <span class="keywordtype">char</span> ); -<a name="l00236"></a>00236 <span class="keywordtype">int</span> TomaConfiguracion(<span class="keywordtype">char</span>* ); -<a name="l00237"></a>00237 <span class="keywordtype">int</span> split_parametros(<span class="keywordtype">char</span> **,<span class="keywordtype">char</span> *, <span class="keywordtype">char</span> *); -<a name="l00238"></a>00238 <span class="keyword">struct </span>tm * TomaHora(); -</pre></div></div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/hidraboot_8h-source.html b/doc/html/hidraboot_8h-source.html deleted file mode 100644 index 276cc9d9..00000000 --- a/doc/html/hidraboot_8h-source.html +++ /dev/null @@ -1,298 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Fichero Fuente Hidra/hidraboot/fuentes/hidraboot.h</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -<h1>Hidra/hidraboot/fuentes/hidraboot.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// *************************************************************************************************************</span> -<a name="l00002"></a>00002 <span class="comment">// Aplicacin HIDRA</span> -<a name="l00003"></a>00003 <span class="comment">// Copyright 2003-2005 Jos Manuel Alonso. Todos los derechos reservados.</span> -<a name="l00004"></a>00004 <span class="comment">// Fichero: hidrapxedhcp.h</span> -<a name="l00005"></a>00005 <span class="comment">// </span> -<a name="l00006"></a>00006 <span class="comment">// Descripcin:</span> -<a name="l00007"></a>00007 <span class="comment">// Fichero de cabecera de hidrapxedhcp.cpp</span> -<a name="l00008"></a>00008 <span class="comment">// **************************************************************************************************************</span> -<a name="l00009"></a>00009 <span class="preprocessor">#include <sys/types.h></span> -<a name="l00010"></a>00010 <span class="preprocessor">#include <sys/socket.h></span> -<a name="l00011"></a>00011 <span class="preprocessor">#include <netinet/in.h></span> -<a name="l00012"></a>00012 <span class="preprocessor">#include <arpa/inet.h></span> -<a name="l00013"></a>00013 <span class="preprocessor">#include <stdio.h></span> -<a name="l00014"></a>00014 <span class="preprocessor">#include <stdlib.h></span> -<a name="l00015"></a>00015 <span class="preprocessor">#include <string.h></span> -<a name="l00016"></a>00016 <span class="preprocessor">#include <errno.h></span> -<a name="l00017"></a>00017 <span class="preprocessor">#include <unistd.h></span> -<a name="l00018"></a>00018 <span class="preprocessor">#include <time.h></span> -<a name="l00019"></a>00019 <span class="preprocessor">#include <ctype.h></span> -<a name="l00020"></a>00020 <span class="preprocessor">#include </usr/include/mysql/mysql.h></span> -<a name="l00021"></a>00021 <span class="preprocessor">#include <pthread.h></span> -<a name="l00022"></a>00022 <span class="preprocessor">#include "Database.h"</span> -<a name="l00023"></a>00023 <span class="comment">// _____________________________________________________________________________________________________________</span> -<a name="l00024"></a>00024 -<a name="l00025"></a>00025 <span class="preprocessor">#define PUERTODHCPORIGEN 67</span> -<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define PUERTODHCPDESTINO 68</span> -<a name="l00027"></a>00027 <span class="preprocessor"></span> -<a name="l00028"></a>00028 <span class="preprocessor">#define PUERTOBOOTPORIGEN 4011</span> -<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define PUERTOBOOTPDESTINO 68</span> -<a name="l00030"></a>00030 <span class="preprocessor"></span> -<a name="l00031"></a>00031 <span class="preprocessor">#define PUERTOTFTPORIGEN 69</span> -<a name="l00032"></a>00032 <span class="preprocessor"></span> -<a name="l00033"></a>00033 <span class="preprocessor">#define PUERTOMINUSER 20000</span> -<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define PUERTOMAXUSER 60000</span> -<a name="l00035"></a>00035 <span class="preprocessor"></span> -<a name="l00036"></a>00036 <span class="preprocessor">#define MAX_INTERFACE_LIST 20</span> -<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define MAX_NUM_CSADDRS 20</span> -<a name="l00038"></a>00038 <span class="preprocessor"></span> -<a name="l00039"></a>00039 <span class="comment">// __________________________________________________________________________________________________________</span> -<a name="l00040"></a>00040 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> DWORD; -<a name="l00041"></a>00041 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> WORD; -<a name="l00042"></a>00042 <span class="keyword">typedef</span> <span class="keywordtype">int</span> BOOL; -<a name="l00043"></a>00043 <span class="keyword">typedef</span> <span class="keywordtype">char</span> BYTE; -<a name="l00044"></a>00044 <span class="keyword">typedef</span> <span class="keywordtype">int</span> SOCKET; -<a name="l00045"></a>00045 <span class="keyword">typedef</span> <span class="keywordtype">void</span>* LPVOID; -<a name="l00046"></a>00046 -<a name="l00047"></a>00047 <span class="preprocessor">#define SOCKET_ERROR (-1)</span> -<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define INVALID_SOCKET (SOCKET)(~0)</span> -<a name="l00049"></a>00049 <span class="preprocessor"></span> -<a name="l00050"></a>00050 <span class="preprocessor">#define TRUE 1</span> -<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span> -<a name="l00052"></a>00052 <span class="preprocessor"></span> -<a name="l00053"></a>00053 <span class="preprocessor">#define true 1</span> -<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define false 0</span> -<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="comment">// __________________________________________________________________________________________________________</span> -<a name="l00056"></a>00056 -<a name="l00057"></a>00057 <span class="keywordtype">char</span> szPathFileCfg[128],szPathFileLog[128]; -<a name="l00058"></a>00058 FILE *FLog,*Fconfig; -<a name="l00059"></a>00059 <span class="keywordtype">char</span> mensaje[1000]; -<a name="l00060"></a>00060 <span class="comment">// _____________________________________________________________________________________________________________</span> -<a name="l00061"></a>00061 <span class="preprocessor">#define DHCP_UDP_OVERHEAD (20 + 8 ) // IP header + UDP header</span> -<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_SNAME_LEN 64</span> -<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_FILE_LEN 128</span> -<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_FIXED_NON_UDP 236</span> -<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_FIXED_LEN (DHCP_FIXED_NON_UDP + DHCP_UDP_OVERHEAD) // Longitud de la trama sin las opciones</span> -<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MTU_MAX 1500</span> -<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_OPTION_LEN (DHCP_MTU_MAX - DHCP_FIXED_LEN)</span> -<a name="l00068"></a>00068 <span class="preprocessor"></span> -<a name="l00069"></a>00069 <span class="preprocessor">#define BOOTP_MIN_LEN 300</span> -<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MIN_LEN 548</span> -<a name="l00071"></a>00071 <span class="preprocessor"></span> -<a name="l00072"></a>00072 <span class="keyword">struct </span>dhcp_packet { -<a name="l00073"></a>00073 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> op; <span class="comment">// Message opcode</span> -<a name="l00074"></a>00074 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> htype; <span class="comment">// Hardware addr type </span> -<a name="l00075"></a>00075 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> hlen; <span class="comment">// Hardware addr length</span> -<a name="l00076"></a>00076 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> hops; <span class="comment">// Number of relay agent hops from client</span> -<a name="l00077"></a>00077 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> xid; <span class="comment">// Transaction ID </span> -<a name="l00078"></a>00078 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> secs; <span class="comment">// Seconds since client started looking</span> -<a name="l00079"></a>00079 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> flags; <span class="comment">// Flag bits</span> -<a name="l00080"></a>00080 <span class="keyword">struct </span>in_addr ciaddr; <span class="comment">// Client IP address</span> -<a name="l00081"></a>00081 <span class="keyword">struct </span>in_addr yiaddr; <span class="comment">// Client IP address </span> -<a name="l00082"></a>00082 <span class="keyword">struct </span>in_addr siaddr; <span class="comment">// IP address of next server</span> -<a name="l00083"></a>00083 <span class="keyword">struct </span>in_addr giaddr; <span class="comment">// DHCP relay agent IP address</span> -<a name="l00084"></a>00084 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> chaddr [16];<span class="comment">// Client hardware address </span> -<a name="l00085"></a>00085 <span class="keywordtype">char</span> sname[DHCP_SNAME_LEN]; <span class="comment">// Server name</span> -<a name="l00086"></a>00086 <span class="keywordtype">char</span> file[DHCP_FILE_LEN]; <span class="comment">// Boot filename</span> -<a name="l00087"></a>00087 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> magiccookie[4]; -<a name="l00088"></a>00088 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> options [DHCP_OPTION_LEN-4]; <span class="comment">// Optional parameters.</span> -<a name="l00089"></a>00089 }; -<a name="l00090"></a>00090 -<a name="l00091"></a>00091 <span class="comment">// Estructura genrica de una opcin DHCP</span> -<a name="l00092"></a>00092 <span class="keyword">struct </span>dhcp_opcion { -<a name="l00093"></a>00093 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> codop; -<a name="l00094"></a>00094 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> tam; -<a name="l00095"></a>00095 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> dato; -<a name="l00096"></a>00096 }; -<a name="l00097"></a>00097 -<a name="l00098"></a>00098 <span class="comment">// Cdigo de las distintas opciones DHCP</span> -<a name="l00099"></a>00099 <span class="preprocessor">#define DHCP_PAD 0</span> -<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_SUBNET_MASK 1</span> -<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_TIME_OFFSET 2</span> -<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_ROUTERS 3</span> -<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_TIME_SERVERS 4</span> -<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NAME_SERVERS 5</span> -<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_DOMAIN_NAME_SERVERS 6</span> -<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_LOG_SERVERS 7</span> -<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_COOKIE_SERVERS 8</span> -<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_LPR_SERVERS 9</span> -<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_IMPRESS_SERVERS 10</span> -<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_RESOURCE_LOCATION_SERVERS 11</span> -<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_HOST_NAME 12</span> -<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_BOOT_SIZE 13</span> -<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MERIT_DUMP 14</span> -<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_DOMAIN_NAME 15</span> -<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_SWAP_SERVER 16</span> -<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_ROOT_PATH 17</span> -<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_EXTENSIONS_PATH 18</span> -<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_IP_FORWARDING 19</span> -<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NON_LOCAL_SOURCE_ROUTING 20</span> -<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_POLICY_FILTER 21</span> -<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MAX_DGRAM_REASSEMBLY 22</span> -<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_DEFAULT_IP_TTL 23</span> -<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_PATH_MTU_AGING_TIMEOUT 24</span> -<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_PATH_MTU_PLATEAU_TABLE 25</span> -<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_INTERFACE_MTU 26</span> -<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_ALL_SUBNETS_LOCAL 27</span> -<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_BROADCAST_ADDRESS 28</span> -<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_PERFORM_MASK_DISCOVERY 29</span> -<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MASK_SUPPLIER 30</span> -<a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_ROUTER_DISCOVERY 31</span> -<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_ROUTER_SOLICITATION_ADDRESS 32</span> -<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_STATIC_ROUTES 33</span> -<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_TRAILER_ENCAPSULATION 34</span> -<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_ARP_CACHE_TIMEOUT 35</span> -<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_IEEE802_3_ENCAPSULATION 36</span> -<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_DEFAULT_TCP_TTL 37</span> -<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_TCP_KEEPALIVE_INTERVAL 38</span> -<a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_TCP_KEEPALIVE_GARBAGE 39</span> -<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NIS_DOMAIN 40</span> -<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NIS_SERVERS 41</span> -<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NTP_SERVERS 42</span> -<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_VENDOR_ENCAPSULATED_OPTIONS 43</span> -<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NETBIOS_NAME_SERVERS 44</span> -<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NETBIOS_DD_SERVER 45</span> -<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NETBIOS_NODE_TYPE 46</span> -<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_NETBIOS_SCOPE 47</span> -<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_FONT_SERVERS 48</span> -<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_X_DISPLAY_MANAGER 49</span> -<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_REQUESTED_ADDRESS 50</span> -<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_LEASE_TIME 51</span> -<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_OPTION_OVERLOAD 52</span> -<a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MESSAGE_TYPE 53</span> -<a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_SERVER_IDENTIFIER 54</span> -<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_PARAMETER_REQUEST_LIST 55</span> -<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MESSAGE 56</span> -<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_MAX_MESSAGE_SIZE 57</span> -<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_RENEWAL_TIME 58</span> -<a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_REBINDING_TIME 59</span> -<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_CLASS_IDENTIFIER 60</span> -<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_CLIENT_IDENTIFIER 61</span> -<a name="l00161"></a>00161 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_USER_CLASS_ID 77</span> -<a name="l00162"></a>00162 <span class="preprocessor"></span><span class="preprocessor">#define DHCP_END 255</span> -<a name="l00163"></a>00163 <span class="preprocessor"></span> -<a name="l00164"></a>00164 <span class="comment">// DHCP message types.</span> -<a name="l00165"></a>00165 <span class="preprocessor">#define DHCPDISCOVER 1</span> -<a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define DHCPOFFER 2</span> -<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#define DHCPREQUEST 3</span> -<a name="l00168"></a>00168 <span class="preprocessor"></span><span class="preprocessor">#define DHCPDECLINE 4</span> -<a name="l00169"></a>00169 <span class="preprocessor"></span><span class="preprocessor">#define DHCPACK 5</span> -<a name="l00170"></a>00170 <span class="preprocessor"></span><span class="preprocessor">#define DHCPNAK 6</span> -<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">#define DHCPRELEASE 7</span> -<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#define DHCPINFORM 8</span> -<a name="l00173"></a>00173 <span class="preprocessor"></span> -<a name="l00174"></a>00174 <span class="comment">// Estructura para trabajar en cada hebra con el cliente en cuestion</span> -<a name="l00175"></a>00175 <span class="keyword">struct </span>TramaDhcpBootp{ -<a name="l00176"></a>00176 SOCKET sck; -<a name="l00177"></a>00177 <span class="keyword">struct </span>sockaddr_in cliente; -<a name="l00178"></a>00178 socklen_t sockaddrsize; -<a name="l00179"></a>00179 <span class="keyword">struct </span>dhcp_packet pckDchp; -<a name="l00180"></a>00180 <span class="keywordtype">char</span> bdIP[16]; -<a name="l00181"></a>00181 }; -<a name="l00182"></a>00182 <span class="comment">// _____________________________________________________________________________________________________________</span> -<a name="l00183"></a>00183 -<a name="l00184"></a>00184 <span class="preprocessor">#define MAXBLOCK 4096</span> -<a name="l00185"></a>00185 <span class="preprocessor"></span> -<a name="l00186"></a>00186 -<a name="l00187"></a>00187 <span class="comment">// TFTP Cdigos de operacin.</span> -<a name="l00188"></a>00188 <span class="preprocessor">#define TFTPRRQ 1 // Read request.</span> -<a name="l00189"></a>00189 <span class="preprocessor"></span><span class="preprocessor">#define TFTPWRQ 2 // Write request</span> -<a name="l00190"></a>00190 <span class="preprocessor"></span><span class="preprocessor">#define TFTPDATA 3 // Read or write the next block of data.</span> -<a name="l00191"></a>00191 <span class="preprocessor"></span><span class="preprocessor">#define TFTPACK 4 // Confirnacin de bloque procesado</span> -<a name="l00192"></a>00192 <span class="preprocessor"></span><span class="preprocessor">#define TFTPERROR 5 // Error message</span> -<a name="l00193"></a>00193 <span class="preprocessor"></span><span class="preprocessor">#define TFTPOACK 6 // Option acknowledgment </span> -<a name="l00194"></a>00194 <span class="preprocessor"></span> -<a name="l00195"></a>00195 <span class="comment">// Paquete TFTP genrico</span> -<a name="l00196"></a>00196 <span class="keyword">struct </span>tftp_packet -<a name="l00197"></a>00197 { -<a name="l00198"></a>00198 WORD opcode; -<a name="l00199"></a>00199 <span class="keywordtype">char</span> buffer[MAXBLOCK+2]; -<a name="l00200"></a>00200 }; -<a name="l00201"></a>00201 <span class="comment">// Paquete TFTP tipo ACK</span> -<a name="l00202"></a>00202 <span class="keyword">struct </span>tftppacket_ack -<a name="l00203"></a>00203 { -<a name="l00204"></a>00204 WORD opcode; -<a name="l00205"></a>00205 WORD block; -<a name="l00206"></a>00206 <span class="keywordtype">char</span> buffer[MAXBLOCK]; -<a name="l00207"></a>00207 }; -<a name="l00208"></a>00208 <span class="comment">// Paquete TFTP tipo ERROR packet</span> -<a name="l00209"></a>00209 <span class="keyword">struct </span>tftppacket_error -<a name="l00210"></a>00210 { -<a name="l00211"></a>00211 WORD opcode; -<a name="l00212"></a>00212 WORD errorcode; -<a name="l00213"></a>00213 <span class="keywordtype">char</span> errormessage[508]; -<a name="l00214"></a>00214 }; -<a name="l00215"></a>00215 <span class="comment">// Estructura para trabajar en cada hebra con el cliente en cuestion</span> -<a name="l00216"></a>00216 <span class="keyword">struct </span>TramaTftp{ -<a name="l00217"></a>00217 SOCKET sck; -<a name="l00218"></a>00218 <span class="keyword">struct </span>sockaddr_in cliente; -<a name="l00219"></a>00219 socklen_t sockaddrsize; -<a name="l00220"></a>00220 <span class="keyword">struct </span>tftp_packet pckTftp; -<a name="l00221"></a>00221 FILE * fileboot; -<a name="l00222"></a>00222 <span class="keywordtype">int</span> bloquesize; -<a name="l00223"></a>00223 <span class="keywordtype">int</span> tsize; -<a name="l00224"></a>00224 <span class="keywordtype">int</span> interval; -<a name="l00225"></a>00225 <span class="keywordtype">int</span> numblock; -<a name="l00226"></a>00226 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> currentopCode; -<a name="l00227"></a>00227 }; -<a name="l00228"></a>00228 <span class="comment">//______________________________________________________</span> -<a name="l00229"></a>00229 <span class="keyword">static</span> pthread_mutex_t guardia; <span class="comment">// Controla acceso exclusivo de hebras </span> -<a name="l00230"></a>00230 <span class="comment">//______________________________________________________</span> -<a name="l00231"></a>00231 <span class="keywordtype">char</span> IPlocal[20]; -<a name="l00232"></a>00232 <span class="keywordtype">char</span> usuario[20]; -<a name="l00233"></a>00233 <span class="keywordtype">char</span> pasguor[20]; -<a name="l00234"></a>00234 <span class="keywordtype">char</span> datasource[20]; -<a name="l00235"></a>00235 <span class="keywordtype">char</span> catalog[50]; -<a name="l00236"></a>00236 -<a name="l00237"></a>00237 <span class="comment">// Prototipo de funciones</span> -<a name="l00238"></a>00238 <span class="keywordtype">void</span> RegistraLog(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>); -<a name="l00239"></a>00239 <span class="keywordtype">int</span> TomaParametrosReg(); -<a name="l00240"></a>00240 -<a name="l00241"></a>00241 LPVOID ServicioDHCP(LPVOID); -<a name="l00242"></a>00242 LPVOID ServicioBOOTP(LPVOID); -<a name="l00243"></a>00243 LPVOID ServicioTFTP(LPVOID); -<a name="l00244"></a>00244 LPVOID GestionaServicioDHCP(LPVOID); -<a name="l00245"></a>00245 LPVOID GestionaServicioBOOTP(LPVOID); -<a name="l00246"></a>00246 LPVOID GestionaServicioTFTP(LPVOID); -<a name="l00247"></a>00247 -<a name="l00248"></a>00248 <span class="keywordtype">int</span> ClienteExistente(<span class="keyword">struct</span> TramaDhcpBootp *,<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>); -<a name="l00249"></a>00249 <span class="keywordtype">int</span> OpcionesPresentes(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *); -<a name="l00250"></a>00250 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * BuscaOpcion(dhcp_packet* ,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ); -<a name="l00251"></a>00251 -<a name="l00252"></a>00252 <span class="keywordtype">int</span> OpcionPXEClient(dhcp_packet* ); -<a name="l00253"></a>00253 <span class="keywordtype">void</span> ProcesaTramaClientePXE(<span class="keyword">struct</span> TramaDhcpBootp* trmInfo); -<a name="l00254"></a>00254 <span class="keywordtype">void</span> ProcesaTramaClienteDHCP(<span class="keyword">struct</span> TramaDhcpBootp* trmInfo); -<a name="l00255"></a>00255 <span class="keywordtype">void</span> ProcesaTramaClienteBOOTP(<span class="keyword">struct</span> TramaDhcpBootp* trmInfo); -<a name="l00256"></a>00256 <span class="keywordtype">void</span> ProcesaTramaClienteTFTP(<span class="keyword">struct</span> TramaTftp * trmInfo); -<a name="l00257"></a>00257 -<a name="l00258"></a>00258 <span class="keywordtype">void</span> RellenaIPCLiente(<span class="keyword">struct</span> TramaDhcpBootp*); -<a name="l00259"></a>00259 <span class="keywordtype">void</span> RellenaIPServidor(<span class="keyword">struct</span> TramaDhcpBootp*); -<a name="l00260"></a>00260 <span class="keywordtype">void</span> dhcpDISCOVER_PXE(<span class="keyword">struct</span> TramaDhcpBootp*); -<a name="l00261"></a>00261 <span class="keywordtype">void</span> dhcpREQUEST_PXE(<span class="keyword">struct</span> TramaDhcpBootp*); -<a name="l00262"></a>00262 <span class="keywordtype">void</span> bootpREQUEST_PXE(<span class="keyword">struct</span> TramaDhcpBootp*); -<a name="l00263"></a>00263 -<a name="l00264"></a>00264 <span class="keywordtype">int</span> PeticionFichero(<span class="keyword">struct</span> TramaTftp*); -<a name="l00265"></a>00265 -<a name="l00266"></a>00266 <span class="keywordtype">void</span> AdjDHCPOFFER(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>**,<span class="keywordtype">int</span>*); -<a name="l00267"></a>00267 <span class="keywordtype">void</span> AdjDHCPACK(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>**,<span class="keywordtype">int</span>*); -<a name="l00268"></a>00268 <span class="keywordtype">void</span> AdjROUTERS(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>** ,<span class="keywordtype">int</span>*); -<a name="l00269"></a>00269 <span class="keywordtype">void</span> AdjSUBNETMASK(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>**,<span class="keywordtype">int</span>*); -<a name="l00270"></a>00270 <span class="keywordtype">void</span> AdjCLASSIDENTIFIER(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>** ,<span class="keywordtype">int</span>*); -<a name="l00271"></a>00271 <span class="keywordtype">void</span> AdjSERVERIDENTIFIER(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>** ,<span class="keywordtype">int</span>*); -<a name="l00272"></a>00272 <span class="keywordtype">void</span> AdjLEASETIME(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>** ,<span class="keywordtype">int</span>*); -<a name="l00273"></a>00273 <span class="keywordtype">void</span> AdjBOOTSIZE(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>** ,<span class="keywordtype">int</span>*); -<a name="l00274"></a>00274 -<a name="l00275"></a>00275 SOCKET TomaSocketUser(); -<a name="l00276"></a>00276 <span class="keyword">struct </span>tm * TomaHora(); -<a name="l00277"></a>00277 <span class="keywordtype">int</span> split_parametros(<span class="keywordtype">char</span> **,<span class="keywordtype">char</span> *, <span class="keywordtype">char</span> *); -<a name="l00278"></a>00278 <span class="keywordtype">void</span> duerme(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ); -</pre></div></div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/hidrac_8h-source.html b/doc/html/hidrac_8h-source.html deleted file mode 100644 index 92bf9b85..00000000 --- a/doc/html/hidrac_8h-source.html +++ /dev/null @@ -1,309 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Fichero Fuente Hidra/hidrac/fuentes/hidrac.h</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -<h1>Hidra/hidrac/fuentes/hidrac.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ***************************************************************************************************************************************</span> -<a name="l00002"></a>00002 <span class="comment">// Aplicacin HIDRA (Gestin y Admistracin de aulas de informtica)</span> -<a name="l00003"></a>00003 <span class="comment">// Copyright 2003-2007 Jos Manuel Alonso. Todos los derechos reservados.</span> -<a name="l00004"></a>00004 <span class="comment">// Fichero: hidrax.h</span> -<a name="l00005"></a>00005 <span class="comment">// Descripcin:</span> -<a name="l00006"></a>00006 <span class="comment">// Fichero de cabecera de hidrax.cpp</span> -<a name="l00007"></a>00007 <span class="comment">// ***************************************************************************************************************************************</span> -<a name="l00008"></a>00008 <span class="preprocessor">#include <sys/types.h></span> -<a name="l00009"></a>00009 <span class="preprocessor">#include <sys/wait.h></span> -<a name="l00010"></a>00010 <span class="preprocessor">#include <sys/socket.h></span> -<a name="l00011"></a>00011 <span class="preprocessor">#include <netinet/in.h></span> -<a name="l00012"></a>00012 <span class="preprocessor">#include <netdb.h></span> -<a name="l00013"></a>00013 <span class="preprocessor">#include <arpa/inet.h></span> -<a name="l00014"></a>00014 <span class="preprocessor">#include <stdio.h></span> -<a name="l00015"></a>00015 <span class="preprocessor">#include <stdlib.h></span> -<a name="l00016"></a>00016 <span class="preprocessor">#include <string.h></span> -<a name="l00017"></a>00017 <span class="preprocessor">#include <errno.h></span> -<a name="l00018"></a>00018 <span class="preprocessor">#include <unistd.h></span> -<a name="l00019"></a>00019 <span class="preprocessor">#include <ctype.h></span> -<a name="l00020"></a>00020 <span class="preprocessor">#include <time.h></span> -<a name="l00021"></a>00021 <span class="preprocessor">#include <signal.h></span> -<a name="l00022"></a>00022 -<a name="l00023"></a>00023 <span class="preprocessor">#define LEER 0</span> -<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define ESCRIBIR 1</span> -<a name="l00025"></a>00025 <span class="preprocessor"></span> -<a name="l00026"></a>00026 <span class="preprocessor">#define LONGITUD_SCRIPTSALIDA 1024 // Longitud máima de la informacin devuelta por un script</span> -<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define LONGITUD_PARAMETROS 4048 // Longitud m?ima de la informacin de la trama (parametros)</span> -<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define LONGITUD_TRAMA LONGITUD_PARAMETROS+11 // Longitud m?ima de la trama completa</span> -<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define LONGITUD_CONFIGURACION 1024 // Longitud mxima de las configuraciones de particin</span> -<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define MAX_NUM_CSADDRS 20</span> -<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define MAX_INTERFACE_LIST 20</span> -<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define MAXCNX 5 // Mximos intentos de conexión al servidor HIDRA</span> -<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define MAXITEMS 100</span> -<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define MAXHTMLMNU 4000</span> -<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define MAXPARTICIONES 24</span> -<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define MAXINFOSO 5 // Numero máximo de nemonicos enla inforamción del S.O. de una partición </span> -<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define MAXARGS 16 // Numero máximo de argumentos enviados a un scripts </span> -<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define LONSTD 512 // Longitud de memoria estandar </span> -<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define LONSTDC 256 // Longitud de memoria estandar corta</span> -<a name="l00040"></a>00040 <span class="preprocessor"></span> -<a name="l00041"></a>00041 <span class="preprocessor">#define PUERTOMINUSER 20000</span> -<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define PUERTOMAXUSER 60000</span> -<a name="l00043"></a>00043 <span class="preprocessor"></span> -<a name="l00044"></a>00044 <span class="preprocessor">#define TRUE 1</span> -<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span> -<a name="l00046"></a>00046 <span class="preprocessor"></span> -<a name="l00047"></a>00047 <span class="preprocessor">#define true 1</span> -<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define false 0</span> -<a name="l00049"></a>00049 <span class="preprocessor"></span> -<a name="l00050"></a>00050 <span class="preprocessor">#define SOCKET_ERROR (-1)</span> -<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define INVALID_SOCKET (SOCKET)(~0)</span> -<a name="l00052"></a>00052 <span class="preprocessor"></span> -<a name="l00053"></a>00053 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> WORD; -<a name="l00054"></a>00054 <span class="keyword">typedef</span> <span class="keywordtype">int</span> BOOL; -<a name="l00055"></a>00055 <span class="keyword">typedef</span> <span class="keywordtype">char</span> BYTE; -<a name="l00056"></a>00056 <span class="keyword">typedef</span> <span class="keywordtype">int</span> SOCKET; -<a name="l00057"></a>00057 -<a name="l00058"></a>00058 <span class="keyword">typedef</span> <span class="keyword">struct</span>{ <span class="comment">// EstructUra de la trama recibida</span> -<a name="l00059"></a>00059 <span class="keywordtype">char</span> arroba; <span class="comment">// cabecera de la trama</span> -<a name="l00060"></a>00060 <span class="keywordtype">char</span> identificador[9]; <span class="comment">// identificador de la trama</span> -<a name="l00061"></a>00061 <span class="keywordtype">char</span> ejecutor; <span class="comment">// ejecutor de la trama 1=el servidor hidra 2=el cliente hidra 3=el repositorio</span> -<a name="l00062"></a>00062 <span class="keywordtype">char</span> parametros[LONGITUD_PARAMETROS]; <span class="comment">// Contenido de la trama (par?etros)</span> -<a name="l00063"></a>00063 }TRAMA; -<a name="l00064"></a>00064 -<a name="l00065"></a>00065 TRAMA trama[1]; -<a name="l00066"></a>00066 -<a name="l00067"></a>00067 <span class="keywordtype">char</span> IPlocal[20]; <span class="comment">// Ip local</span> -<a name="l00068"></a>00068 <span class="keywordtype">char</span> Servidorhidra[20]; <span class="comment">// IP servidor HIDRA</span> -<a name="l00069"></a>00069 <span class="keywordtype">char</span> Puerto[20]; <span class="comment">// Puerto Unicode</span> -<a name="l00070"></a>00070 -<a name="l00071"></a>00071 <span class="keywordtype">char</span> szPathFileCfg[128]; -<a name="l00072"></a>00072 <span class="keywordtype">char</span> szPathFileLog[128]; -<a name="l00073"></a>00073 -<a name="l00074"></a>00074 <span class="comment">//___________________________________________________________________________________________________</span> -<a name="l00075"></a>00075 <span class="comment">// Variables y estructuras</span> -<a name="l00076"></a>00076 <span class="comment">//___________________________________________________________________________________________________</span> -<a name="l00077"></a>00077 -<a name="l00078"></a>00078 <span class="keywordtype">char</span> cmdshell[LONSTD]; -<a name="l00079"></a>00079 <span class="keywordtype">char</span> parametros[LONSTD]; -<a name="l00080"></a>00080 <span class="keywordtype">char</span>* argumentos[MAXARGS]; -<a name="l00081"></a>00081 <span class="keywordtype">char</span> msglog[LONSTD]; -<a name="l00082"></a>00082 <span class="keywordtype">char</span> msgcon[LONSTD]; -<a name="l00083"></a>00083 <span class="keywordtype">char</span> filecmdshell[LONSTDC]; -<a name="l00084"></a>00084 <span class="keywordtype">char</span> filemenu[LONSTDC]; -<a name="l00085"></a>00085 <span class="keywordtype">char</span> fileitem[LONSTDC]; -<a name="l00086"></a>00086 <span class="keywordtype">char</span> fileini[LONSTDC]; -<a name="l00087"></a>00087 <span class="keywordtype">char</span> filecmd[LONSTDC]; -<a name="l00088"></a>00088 -<a name="l00089"></a>00089 <span class="keyword">struct </span>excepcion { -<a name="l00090"></a>00090 <span class="keywordtype">int</span> herror; -<a name="l00091"></a>00091 <span class="keywordtype">char</span> msg[LONSTDC]; -<a name="l00092"></a>00092 <span class="keywordtype">char</span> modulo[LONSTDC]; -<a name="l00093"></a>00093 }; -<a name="l00094"></a>00094 <span class="keyword">struct </span>excepcion e; -<a name="l00095"></a>00095 -<a name="l00096"></a>00096 <span class="keywordtype">int</span> ndebug=1; <span class="comment">// Nivel de debuger por defecto</span> -<a name="l00097"></a>00097 -<a name="l00098"></a>00098 <span class="comment">// Nemónicos</span> -<a name="l00099"></a>00099 <span class="keywordtype">int</span> MsDos=1; -<a name="l00100"></a>00100 <span class="keywordtype">int</span> Win98=2; -<a name="l00101"></a>00101 <span class="keywordtype">int</span> Win2K=3; -<a name="l00102"></a>00102 <span class="keywordtype">int</span> WinXP=4; -<a name="l00103"></a>00103 <span class="keywordtype">int</span> Linux=5; -<a name="l00104"></a>00104 -<a name="l00105"></a>00105 BOOL PROCESO=<span class="keyword">true</span>; <span class="comment">// Indicador de la actividad del proceso principal</span> -<a name="l00106"></a>00106 BOOL CACHEEXISTS; <span class="comment">// Indica si existe cache</span> -<a name="l00107"></a>00107 -<a name="l00108"></a>00108 <span class="keywordtype">char</span> HIDRACHEIMAGENES[LONSTDC]; <span class="comment">// Path al directorio donde están las imágenes (en la caché)</span> -<a name="l00109"></a>00109 <span class="keywordtype">char</span> HIDRASRVIMAGENES[LONSTDC]; <span class="comment">// Path al directorio hidra donde están las imágenes (en el repositorio)</span> -<a name="l00110"></a>00110 <span class="keywordtype">char</span> HIDRASRVCMD[LONSTDC]; <span class="comment">// Path del directorio del repositorio donde se depositan los comandos para el cliente hidra</span> -<a name="l00111"></a>00111 <span class="keywordtype">char</span> HIDRASCRIPTS[LONSTDC]; <span class="comment">// Path al directorio donde están los scripts de hidra (en el cliente hidra)</span> -<a name="l00112"></a>00112 -<a name="l00113"></a>00113 <span class="keywordtype">int</span> HIDRAVER; <span class="comment">// Versión Hidra</span> -<a name="l00114"></a>00114 <span class="keywordtype">int</span> TPAR ; <span class="comment">// Tamaño de la particin</span> -<a name="l00115"></a>00115 -<a name="l00116"></a>00116 SOCKET sock; <span class="comment">// Socket</span> -<a name="l00117"></a>00117 -<a name="l00118"></a>00118 <span class="keyword">struct </span>s_CabMnu { -<a name="l00119"></a>00119 <span class="keywordtype">char</span> resolucion[2]; <span class="comment">// Resolucin de pantalla</span> -<a name="l00120"></a>00120 <span class="keywordtype">char</span> titulo[LONSTDC]; <span class="comment">// Titulo del menu</span> -<a name="l00121"></a>00121 <span class="keywordtype">char</span> coorx[4]; <span class="comment">// Coordenada x</span> -<a name="l00122"></a>00122 <span class="keywordtype">char</span> coory[4]; <span class="comment">// Coordenada y</span> -<a name="l00123"></a>00123 <span class="keywordtype">char</span> modalidad[2]; <span class="comment">// modalidad ( numero de items por linea )</span> -<a name="l00124"></a>00124 <span class="keywordtype">char</span> scoorx[4]; <span class="comment">// Coordenada x // Menu privado</span> -<a name="l00125"></a>00125 <span class="keywordtype">char</span> scoory[4]; <span class="comment">// Coordenada y</span> -<a name="l00126"></a>00126 <span class="keywordtype">char</span> smodalidad[LONSTDC]; <span class="comment">// modalidad ( numero de items por linea )</span> -<a name="l00127"></a>00127 <span class="keywordtype">char</span> htmmenupub[64]; <span class="comment">// Nombre del fichero que contiene el html del menu (público)</span> -<a name="l00128"></a>00128 <span class="keywordtype">char</span> htmmenupri[64]; <span class="comment">// Nombre del fichero que contiene el html del menu (privado)</span> -<a name="l00129"></a>00129 } CabMnu; <span class="comment">// Estructura con los datos de los menús</span> -<a name="l00130"></a>00130 -<a name="l00131"></a>00131 BOOL swmnu=<span class="keyword">false</span>; <span class="comment">// Indicador de menu asignado</span> -<a name="l00132"></a>00132 -<a name="l00133"></a>00133 <span class="keyword">struct </span>s_Item{ -<a name="l00134"></a>00134 <span class="keywordtype">char</span> idaccionmenu[16]; <span class="comment">// Identificador del item a ejecutar</span> -<a name="l00135"></a>00135 <span class="keywordtype">char</span> urlimg[64]; <span class="comment">// Nombre de la imagen de fonfo del botn</span> -<a name="l00136"></a>00136 <span class="keywordtype">char</span> literal[LONSTDC]; <span class="comment">// Literal del item</span> -<a name="l00137"></a>00137 <span class="keywordtype">char</span> tipoitem[2]; <span class="comment">// Tipo de otem ( público o privado)</span> -<a name="l00138"></a>00138 <span class="keywordtype">char</span> tipoaccion[2]; <span class="comment">// Tipo de accin que ejecuta el item</span> -<a name="l00139"></a>00139 } ; -<a name="l00140"></a>00140 -<a name="l00141"></a>00141 <span class="keyword">struct </span>s_Propiedades { -<a name="l00142"></a>00142 <span class="keywordtype">char</span> idordenador[16]; <span class="comment">// Identificador del ordenador</span> -<a name="l00143"></a>00143 <span class="keywordtype">char</span> nombreordenador[64]; <span class="comment">// Nombre del ordenador</span> -<a name="l00144"></a>00144 <span class="keywordtype">char</span> idaula[16]; <span class="comment">// Identificador del aula</span> -<a name="l00145"></a>00145 <span class="keywordtype">char</span> servidorhidra[64]; <span class="comment">// IP del servidor HUDRA</span> -<a name="l00146"></a>00146 <span class="keywordtype">char</span> puerto[16]; <span class="comment">// Puerto</span> -<a name="l00147"></a>00147 <span class="keywordtype">char</span> iprepo[16]; <span class="comment">// Direción IP repositorio </span> -<a name="l00148"></a>00148 <span class="keywordtype">char</span> puertorepo[16]; <span class="comment">// Puerto </span> -<a name="l00149"></a>00149 <span class="keywordtype">char</span> idperfilhard[16]; <span class="comment">// Identificador del perfil hardware</span> -<a name="l00150"></a>00150 <span class="keywordtype">char</span> IPlocal[16]; <span class="comment">// Ip local</span> -<a name="l00151"></a>00151 } Propiedades; <span class="comment">// Estructura con los datos del odenador</span> -<a name="l00152"></a>00152 -<a name="l00153"></a>00153 <span class="keyword">struct </span>s_Particiones{ -<a name="l00154"></a>00154 <span class="keywordtype">char</span> tiposo[64]; <span class="comment">// Tipo de sistema operativo </span> -<a name="l00155"></a>00155 <span class="keywordtype">char</span> tipopart[16]; <span class="comment">// Tipo de particin</span> -<a name="l00156"></a>00156 <span class="keywordtype">char</span> tamapart[16]; <span class="comment">// Tamao de la particin</span> -<a name="l00157"></a>00157 <span class="keywordtype">char</span> numpart[5]; <span class="comment">// Nmero de la particin</span> -<a name="l00158"></a>00158 <span class="keywordtype">char</span> nombreso[64]; <span class="comment">// Nombre del S.O.</span> -<a name="l00159"></a>00159 }; -<a name="l00160"></a>00160 -<a name="l00161"></a>00161 <span class="keyword">struct </span>s_Hardware{ -<a name="l00162"></a>00162 <span class="keywordtype">char</span> nemonico[4]; <span class="comment">// Tipo de sistema operativo </span> -<a name="l00163"></a>00163 <span class="keywordtype">char</span> tipo[45]; <span class="comment">// Tipo de hardware</span> -<a name="l00164"></a>00164 <span class="keywordtype">char</span> codigovalor[256]; <span class="comment">// Codigo o descripcion</span> -<a name="l00165"></a>00165 } -<a name="l00166"></a>00166 ; -<a name="l00167"></a>00167 <span class="keyword">struct </span>tiposo { -<a name="l00168"></a>00168 <span class="keywordtype">char</span> *tipopart; -<a name="l00169"></a>00169 <span class="keywordtype">char</span> *tiposo; -<a name="l00170"></a>00170 <span class="keywordtype">char</span> *nombreso; -<a name="l00171"></a>00171 }; -<a name="l00172"></a>00172 <span class="keyword">struct </span>tiposo tiposos[] = { -<a name="l00173"></a>00173 {<span class="stringliteral">"BIGDOS"</span>, <span class="stringliteral">"MsDos"</span>,<span class="stringliteral">"MsDos"</span>}, -<a name="l00174"></a>00174 {<span class="stringliteral">"NTFS"</span>,<span class="stringliteral">"Windows NT Platafom"</span>,<span class="stringliteral">"Windows 2000,XP,2003"</span>}, -<a name="l00175"></a>00175 {<span class="stringliteral">"FAT32"</span>,<span class="stringliteral">"Windows"</span>,<span class="stringliteral">"Windos 98,SE,Millenium"</span>}, -<a name="l00176"></a>00176 {<span class="stringliteral">"EXT"</span>,<span class="stringliteral">"Extendida"</span>,<span class="stringliteral">"Extendida"</span>}, -<a name="l00177"></a>00177 {<span class="stringliteral">"EXT3"</span>,<span class="stringliteral">"Linux"</span>,<span class="stringliteral">"Linux"</span>}, -<a name="l00178"></a>00178 {<span class="stringliteral">"EXT2"</span>,<span class="stringliteral">"Linux"</span>,<span class="stringliteral">"Linux"</span>}, -<a name="l00179"></a>00179 {<span class="stringliteral">"VFAT"</span>,<span class="stringliteral">"VFAT"</span>,<span class="stringliteral">"VFAT"</span>}, -<a name="l00180"></a>00180 {<span class="stringliteral">"CACHE"</span>,<span class="stringliteral">"CACHE"</span>,<span class="stringliteral">"CACHE"</span>}, -<a name="l00181"></a>00181 {<span class="stringliteral">"UNKNOWN"</span>,<span class="stringliteral">"UNKNOWN"</span>,<span class="stringliteral">"UNKNOWN"</span>}, -<a name="l00182"></a>00182 {<span class="stringliteral">"EMPTY"</span>,<span class="stringliteral">"Libre"</span>,<span class="stringliteral">"Libre"</span>}, -<a name="l00183"></a>00183 {<span class="stringliteral">"LINUX-SWAP"</span>,<span class="stringliteral">""</span>,<span class="stringliteral">"Linux-swap"</span>}}; -<a name="l00184"></a>00184 -<a name="l00185"></a>00185 <span class="keywordtype">int</span> ntiposo = <span class="keyword">sizeof</span> (tiposos) / <span class="keyword">sizeof</span> (<span class="keyword">struct</span> tiposo); -<a name="l00186"></a>00186 -<a name="l00187"></a>00187 <span class="keyword">struct </span>s_Item tbMenu[MAXITEMS]; <span class="comment">// Tabla con los items del menu</span> -<a name="l00188"></a>00188 <span class="keywordtype">int</span> contitems; <span class="comment">// Contador items del menu</span> -<a name="l00189"></a>00189 -<a name="l00190"></a>00190 BOOL PRCCMD; <span class="comment">// Indicador de comandos interactivos</span> -<a name="l00191"></a>00191 BOOL CMDPTES; <span class="comment">// Indicador de comandos pendientes</span> -<a name="l00192"></a>00192 -<a name="l00193"></a>00193 <span class="comment">//char modulo[64]; // Nombre de la funcin donde se produce el error</span> -<a name="l00194"></a>00194 -<a name="l00195"></a>00195 BOOL aut = <span class="keyword">false</span>; <span class="comment">// Variable para controlar el acceso al menu de administracion</span> -<a name="l00196"></a>00196 -<a name="l00197"></a>00197 -<a name="l00198"></a>00198 <span class="keywordtype">char</span>* tbErrores[]={<span class="stringliteral">"000-Se han generado errores. No se puede continuar la ejecución de este módulo"</span>,\ -<a name="l00199"></a>00199 <span class="stringliteral">"001-No hay memoria suficiente para el buffer"</span>,\ -<a name="l00200"></a>00200 <span class="stringliteral">"002-No se puede establecer conexión con el servidor Hidra"</span>,\ -<a name="l00201"></a>00201 <span class="stringliteral">"003-El fichero especificado no existe o bien no puede crearse o abrirse"</span>,\ -<a name="l00202"></a>00202 <span class="stringliteral">"004-Comando Error"</span>,\ -<a name="l00203"></a>00203 <span class="stringliteral">"005-El fichero est vacio"</span>,\ -<a name="l00204"></a>00204 <span class="stringliteral">"006-Error en la ejecución del fichero autoexec"</span>,\ -<a name="l00205"></a>00205 <span class="stringliteral">"007-Error en la recuperacion del Menu principal"</span>,\ -<a name="l00206"></a>00206 <span class="stringliteral">"008-No hay espacio reservado para la cache en este disco"</span>,\ -<a name="l00207"></a>00207 <span class="stringliteral">"009-Ha ocurrido algún error generando el perfil software"</span>,\ -<a name="l00208"></a>00208 <span class="stringliteral">"010-IPlocal, NO se ha definido este parámetro"</span>,\ -<a name="l00209"></a>00209 <span class="stringliteral">"011-IPhidra, NO se ha definido este parámetro"</span>,\ -<a name="l00210"></a>00210 <span class="stringliteral">"012-Puerto, NO se ha definido este parámetro"</span>,\ -<a name="l00211"></a>00211 <span class="stringliteral">"013-NO existe fichero de configuración o contiene un error de sintaxis"</span>,\ -<a name="l00212"></a>00212 <span class="stringliteral">"014-Fallo de sintaxis en los parámetros: Debe especificar -f nombre_del_fichero_de_configuración"</span>,\ -<a name="l00213"></a>00213 <span class="stringliteral">"015-No se ha podido crear socket para comunicación con el repositorio"</span>,\ -<a name="l00214"></a>00214 <span class="stringliteral">"016-No se ha podido comunicar con el repositorio"</span>,\ -<a name="l00215"></a>00215 <span class="stringliteral">"017-No existe Menu principal"</span>,\ -<a name="l00216"></a>00216 <span class="stringliteral">"018-No se ha podido recuperar la configuración hardware del ordenador"</span>,\ -<a name="l00217"></a>00217 <span class="stringliteral">"019-El cliente no se ha podido incluir en el sistema por un fallo en la conexión con el Servidor Hidra"</span>,\ -<a name="l00218"></a>00218 <span class="stringliteral">"020-No se ha podido crear la carpeta en el repositorio"</span>,\ -<a name="l00219"></a>00219 <span class="stringliteral">"021-Error en el envío de tramas al servidor Hidra"</span>,\ -<a name="l00220"></a>00220 <span class="stringliteral">"022-Error en la recepción de tramas desde el servidor Hidra"</span>,\ -<a name="l00221"></a>00221 <span class="stringliteral">"023-Error desconocido"</span>,\ -<a name="l00222"></a>00222 }; -<a name="l00223"></a>00223 -<a name="l00224"></a>00224 <span class="preprocessor">#define MAXERROR 23 // Error máximo cometido</span> -<a name="l00225"></a>00225 <span class="preprocessor"></span> -<a name="l00226"></a>00226 <span class="comment">// Prototipos de funciones</span> -<a name="l00227"></a>00227 <span class="keywordtype">char</span>* Desencriptar(<span class="keywordtype">char</span> *); -<a name="l00228"></a>00228 <span class="keywordtype">char</span>* Encriptar(<span class="keywordtype">char</span> *); -<a name="l00229"></a>00229 <span class="keywordtype">int</span> ValidacionParametros(<span class="keywordtype">int</span>,<span class="keywordtype">char</span>**); -<a name="l00230"></a>00230 <span class="keywordtype">int</span> CrearArchivoLog(<span class="keywordtype">char</span>*); -<a name="l00231"></a>00231 <span class="keywordtype">int</span> LeeFileConfiguracion(); -<a name="l00232"></a>00232 <span class="keywordtype">void</span> Log(<span class="keywordtype">char</span>*); -<a name="l00233"></a>00233 <span class="keywordtype">void</span> UltimoError(<span class="keywordtype">int</span>,<span class="keywordtype">char</span>*); -<a name="l00234"></a>00234 <span class="keywordtype">void</span> INTROaFINCAD(<span class="keywordtype">char</span>*); -<a name="l00235"></a>00235 <span class="keywordtype">char</span>* TomaParametro(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00236"></a>00236 <span class="keywordtype">int</span> SplitParametros(<span class="keywordtype">char</span>**,<span class="keywordtype">char</span>*, <span class="keywordtype">char</span>*); -<a name="l00237"></a>00237 -<a name="l00238"></a>00238 <span class="keywordtype">int</span> EjecutarScript (<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>* ,<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>); -<a name="l00239"></a>00239 <span class="keywordtype">char</span>* ReservaMemoria(<span class="keywordtype">int</span>); -<a name="l00240"></a>00240 -<a name="l00241"></a>00241 SOCKET TCPConnect(<span class="keywordtype">char</span> *,<span class="keywordtype">char</span>* ); -<a name="l00242"></a>00242 <span class="keywordtype">void</span> TCPClose(SOCKET); -<a name="l00243"></a>00243 <span class="keywordtype">int</span> AbreConexionTCP(<span class="keywordtype">void</span>); -<a name="l00244"></a>00244 <span class="keywordtype">void</span> CierraConexionTCP(<span class="keywordtype">void</span>); -<a name="l00245"></a>00245 <span class="keywordtype">int</span> EnviaTramasHidra(SOCKET,TRAMA*); -<a name="l00246"></a>00246 <span class="keywordtype">int</span> RecibeTramasHidra(SOCKET,TRAMA*); -<a name="l00247"></a>00247 <span class="keywordtype">int</span> TCPWrite(SOCKET ,TRAMA*); -<a name="l00248"></a>00248 <span class="keywordtype">int</span> TCPRead(SOCKET ,TRAMA*); -<a name="l00249"></a>00249 SOCKET UDPConnect(); -<a name="l00250"></a>00250 <span class="keywordtype">int</span> EnviaTramaRepo(SOCKET,TRAMA*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00251"></a>00251 <span class="keywordtype">int</span> RecibeTramaRepo(SOCKET); -<a name="l00252"></a>00252 -<a name="l00253"></a>00253 <span class="keywordtype">long</span> CreateTextFile(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00254"></a>00254 <span class="keywordtype">int</span> ExisteFichero(<span class="keywordtype">char</span>*); -<a name="l00255"></a>00255 <span class="keywordtype">int</span> RemoveFile(<span class="keywordtype">char</span> *); -<a name="l00256"></a>00256 <span class="keywordtype">int</span> LoadTextFile(<span class="keywordtype">char</span> *); -<a name="l00257"></a>00257 -<a name="l00258"></a>00258 <span class="keywordtype">int</span> ProcesaComandos(); -<a name="l00259"></a>00259 <span class="keywordtype">int</span> DisponibilidadComandos(<span class="keywordtype">int</span>); -<a name="l00260"></a>00260 <span class="keywordtype">int</span> GestionTramas(TRAMA *); -<a name="l00261"></a>00261 -<a name="l00262"></a>00262 <span class="keywordtype">int</span> Cortesia(); -<a name="l00263"></a>00263 <span class="keywordtype">int</span> NoComandosPtes(); -<a name="l00264"></a>00264 <span class="keywordtype">int</span> TomaIPlocal(); -<a name="l00265"></a>00265 <span class="keywordtype">int</span> InclusionClienteHIDRA(); -<a name="l00266"></a>00266 <span class="keywordtype">int</span> RESPUESTA_InclusionClienteHIDRA(TRAMA*); -<a name="l00267"></a>00267 <span class="keywordtype">int</span> ComandosPendientes(<span class="keywordtype">void</span>); -<a name="l00268"></a>00268 <span class="keywordtype">int</span> Arrancar(TRAMA *,TRAMA *); -<a name="l00269"></a>00269 <span class="keywordtype">int</span> Apagar(TRAMA*,TRAMA*); -<a name="l00270"></a>00270 <span class="keywordtype">int</span> Reiniciar(TRAMA*,TRAMA*); -<a name="l00271"></a>00271 <span class="keywordtype">int</span> Actualizar(); -<a name="l00272"></a>00272 <span class="keywordtype">int</span> CrearPerfilSoftware(TRAMA*,TRAMA*); -<a name="l00273"></a>00273 <span class="keywordtype">int</span> CrearPerfil(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00274"></a>00274 <span class="keywordtype">int</span> Nemonico(<span class="keywordtype">char</span>*); -<a name="l00275"></a>00275 <span class="keywordtype">int</span> RestaurarImagen(TRAMA*,TRAMA*); -<a name="l00276"></a>00276 <span class="keywordtype">int</span> RestaurandoImagen(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00277"></a>00277 <span class="keywordtype">int</span> ParticionaryFormatear(TRAMA*,TRAMA*); -<a name="l00278"></a>00278 <span class="keywordtype">int</span> Particionar(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>* ); -<a name="l00279"></a>00279 <span class="keywordtype">int</span> Particionando(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00280"></a>00280 <span class="keywordtype">int</span> Formatear(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00281"></a>00281 <span class="keywordtype">int</span> SetCachePartitionSize(<span class="keywordtype">int</span>); -<a name="l00282"></a>00282 <span class="keywordtype">int</span> AutoexecClienteHidra(<span class="keywordtype">void</span>); -<a name="l00283"></a>00283 <span class="keywordtype">char</span>* LeeConfiguracion(<span class="keywordtype">char</span>*); -<a name="l00284"></a>00284 <span class="keywordtype">char</span>* TomaNomSO(<span class="keywordtype">char</span>*,<span class="keywordtype">int</span>); -<a name="l00285"></a>00285 <span class="keywordtype">int</span> InventarioHardware(TRAMA *,TRAMA *); -<a name="l00286"></a>00286 <span class="keywordtype">int</span> TomaConfiguracion(TRAMA *,TRAMA *); -<a name="l00287"></a>00287 <span class="keywordtype">int</span> RespuestaEjecucionComando(TRAMA* , TRAMA *, <span class="keywordtype">int</span>); -<a name="l00288"></a>00288 <span class="keywordtype">int</span> ExecShell(TRAMA *,TRAMA *); -<a name="l00289"></a>00289 <span class="keywordtype">char</span>* URLDecode(<span class="keywordtype">char</span>*); -</pre></div></div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/hidrarepos_8h-source.html b/doc/html/hidrarepos_8h-source.html deleted file mode 100644 index 89d6c90f..00000000 --- a/doc/html/hidrarepos_8h-source.html +++ /dev/null @@ -1,153 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Fichero Fuente Hidra/hidrarepos/fuentes/hidrarepos.h</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.html"><span>Página principal</span></a></li> - <li class="current"><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -<h1>Hidra/hidrarepos/fuentes/hidrarepos.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// *************************************************************************************************************</span> -<a name="l00002"></a>00002 <span class="comment">// Aplicacin HIDRA</span> -<a name="l00003"></a>00003 <span class="comment">// Copyright 2003-2007 Jos Manuel Alonso. Todos los derechos reservados.</span> -<a name="l00004"></a>00004 <span class="comment">// Fichero: hidrarepos.h</span> -<a name="l00005"></a>00005 <span class="comment">// </span> -<a name="l00006"></a>00006 <span class="comment">// Descripcin:</span> -<a name="l00007"></a>00007 <span class="comment">// Fichero de cabecera de hidrapxedhcp.cpp</span> -<a name="l00008"></a>00008 <span class="comment">// **************************************************************************************************************</span> -<a name="l00009"></a>00009 <span class="preprocessor">#include <sys/types.h></span> -<a name="l00010"></a>00010 <span class="preprocessor">#include <sys/socket.h></span> -<a name="l00011"></a>00011 <span class="preprocessor">#include <arpa/inet.h></span> -<a name="l00012"></a>00012 <span class="preprocessor">#include <stdio.h></span> -<a name="l00013"></a>00013 <span class="preprocessor">#include <stdlib.h></span> -<a name="l00014"></a>00014 <span class="preprocessor">#include <string.h></span> -<a name="l00015"></a>00015 <span class="preprocessor">#include <errno.h></span> -<a name="l00016"></a>00016 <span class="preprocessor">#include <unistd.h></span> -<a name="l00017"></a>00017 <span class="preprocessor">#include <ctype.h></span> -<a name="l00018"></a>00018 <span class="preprocessor">#include <time.h></span> -<a name="l00019"></a>00019 <span class="preprocessor">#include </usr/include/mysql/mysql.h></span> -<a name="l00020"></a>00020 <span class="preprocessor">#include <pthread.h></span> -<a name="l00021"></a>00021 <span class="preprocessor">#include <signal.h></span> -<a name="l00022"></a>00022 <span class="preprocessor">#include "Database.h"</span> -<a name="l00023"></a>00023 <span class="preprocessor">#include "encriptacion.h"</span> -<a name="l00024"></a>00024 -<a name="l00025"></a>00025 <span class="preprocessor">#define LONGITUD_PARAMETROS 4048 // Longitud m?ima de la informacin de la trama (parametros)</span> -<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define LONGITUD_TRAMA LONGITUD_PARAMETROS+8 // Longitud m?ima de la trama completa</span> -<a name="l00027"></a>00027 <span class="preprocessor"></span> -<a name="l00028"></a>00028 <span class="preprocessor">#define MAXIMOS_CLIENTES 4000 // M?imo numero de clientes rembo controlados por el servidor rembo</span> -<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define MAXCNX 5 // Mximos intentos de conexin al servidor HIDRA</span> -<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define PUERTO_WAKEUP 9 // Puerto por defecto del wake up</span> -<a name="l00031"></a>00031 <span class="preprocessor"></span> -<a name="l00032"></a>00032 <span class="preprocessor">#define PUERTOMINUSER 20000</span> -<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define PUERTOMAXUSER 60000</span> -<a name="l00034"></a>00034 <span class="preprocessor"></span> -<a name="l00035"></a>00035 <span class="preprocessor">#define LEER 0</span> -<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define ESCRIBIR 1</span> -<a name="l00037"></a>00037 <span class="preprocessor"></span> -<a name="l00038"></a>00038 <span class="preprocessor">#define TRUE 1</span> -<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span> -<a name="l00040"></a>00040 <span class="preprocessor"></span> -<a name="l00041"></a>00041 <span class="preprocessor">#define true 1</span> -<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define false 0</span> -<a name="l00043"></a>00043 <span class="preprocessor"></span> -<a name="l00044"></a>00044 <span class="preprocessor">#define SOCKET_ERROR (-1)</span> -<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define INVALID_SOCKET (SOCKET)(~0)</span> -<a name="l00046"></a>00046 <span class="preprocessor"></span> -<a name="l00047"></a>00047 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> DWORD; -<a name="l00048"></a>00048 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> WORD; -<a name="l00049"></a>00049 <span class="keyword">typedef</span> <span class="keywordtype">int</span> BOOL; -<a name="l00050"></a>00050 <span class="keyword">typedef</span> <span class="keywordtype">char</span> BYTE; -<a name="l00051"></a>00051 <span class="keyword">typedef</span> <span class="keywordtype">int</span> SOCKET; -<a name="l00052"></a>00052 <span class="keyword">typedef</span> <span class="keywordtype">void</span>* LPVOID; -<a name="l00053"></a>00053 -<a name="l00054"></a>00054 <span class="keyword">typedef</span> <span class="keyword">struct</span>{ <span class="comment">// EstructUra de la trama recibida</span> -<a name="l00055"></a>00055 <span class="keywordtype">char</span> arroba; <span class="comment">// cabecera de la trama</span> -<a name="l00056"></a>00056 <span class="keywordtype">char</span> identificador[9]; <span class="comment">// identificador de la trama</span> -<a name="l00057"></a>00057 <span class="keywordtype">char</span> ejecutor; <span class="comment">// ejecutor de la trama 1=el servidor rembo 2=el cliente rembo</span> -<a name="l00058"></a>00058 <span class="keywordtype">char</span> parametros[LONGITUD_PARAMETROS]; <span class="comment">// Contenido de la trama (par?etros)</span> -<a name="l00059"></a>00059 }TRAMA; -<a name="l00060"></a>00060 -<a name="l00061"></a>00061 <span class="comment">// Estructura para trabajar en cada hebra con el cliente en cuestion</span> -<a name="l00062"></a>00062 <span class="keyword">struct </span>TramaRepos{ -<a name="l00063"></a>00063 SOCKET sck; -<a name="l00064"></a>00064 <span class="keyword">struct </span>sockaddr_in cliente; -<a name="l00065"></a>00065 socklen_t sockaddrsize; -<a name="l00066"></a>00066 TRAMA trama; -<a name="l00067"></a>00067 }; -<a name="l00068"></a>00068 <span class="keywordtype">char</span> szPathFileCfg[128],szPathFileLog[128]; -<a name="l00069"></a>00069 FILE *FLog,*Fconfig; -<a name="l00070"></a>00070 SOCKET sClient; -<a name="l00071"></a>00071 -<a name="l00072"></a>00072 <span class="keywordtype">char</span> IPlocal[20]; <span class="comment">// Ip local</span> -<a name="l00073"></a>00073 <span class="keywordtype">char</span> servidorhidra[20]; <span class="comment">// IP servidor HIDRA</span> -<a name="l00074"></a>00074 <span class="keywordtype">char</span> Puerto[20]; <span class="comment">// Puerto Unicode</span> -<a name="l00075"></a>00075 <span class="keywordtype">int</span> puerto; <span class="comment">// Puerto</span> -<a name="l00076"></a>00076 -<a name="l00077"></a>00077 <span class="keywordtype">char</span> filecmdshell[250]; -<a name="l00078"></a>00078 <span class="keywordtype">char</span> cmdshell[512]; -<a name="l00079"></a>00079 -<a name="l00080"></a>00080 <span class="keywordtype">char</span> msglog[250]; -<a name="l00081"></a>00081 -<a name="l00082"></a>00082 <span class="keywordtype">char</span> usuario[20]; -<a name="l00083"></a>00083 <span class="keywordtype">char</span> pasguor[20]; -<a name="l00084"></a>00084 <span class="keywordtype">char</span> datasource[20]; -<a name="l00085"></a>00085 <span class="keywordtype">char</span> catalog[50]; -<a name="l00086"></a>00086 <span class="keywordtype">int</span> puertorepo; <span class="comment">// Puerto</span> -<a name="l00087"></a>00087 -<a name="l00088"></a>00088 <span class="comment">//______________________________________________________</span> -<a name="l00089"></a>00089 <span class="keyword">static</span> pthread_mutex_t guardia; <span class="comment">// Controla acceso exclusivo de hebras </span> -<a name="l00090"></a>00090 <span class="comment">//______________________________________________________</span> -<a name="l00091"></a>00091 -<a name="l00092"></a>00092 <span class="keywordtype">char</span> PathHidra[1024]; <span class="comment">// path al directorio base de Hidra</span> -<a name="l00093"></a>00093 <span class="keywordtype">char</span> PathComandos[1024]; <span class="comment">// path al directorio donde se depositan los comandos para los clientes</span> -<a name="l00094"></a>00094 <span class="keywordtype">char</span> PathUsuarios[1024]; <span class="comment">// path al directorio donde se depositan los ficheros de login de los operadores</span> -<a name="l00095"></a>00095 <span class="keywordtype">char</span> PathIconos[1024]; <span class="comment">// path al directorio donde se depositan los iconos de los items de los mens</span> -<a name="l00096"></a>00096 -<a name="l00097"></a>00097 <span class="comment">// Prototipos de funciones</span> -<a name="l00098"></a>00098 <span class="keywordtype">void</span> RegistraLog(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span> ); -<a name="l00099"></a>00099 <span class="keywordtype">int</span> split_parametros(<span class="keywordtype">char</span> **,<span class="keywordtype">char</span> *, <span class="keywordtype">char</span> * ); -<a name="l00100"></a>00100 <span class="keywordtype">int</span> TomaConfiguracion(<span class="keywordtype">char</span>* ); -<a name="l00101"></a>00101 <span class="keywordtype">void</span> INTROaFINCAD(<span class="keywordtype">char</span>* ); -<a name="l00102"></a>00102 <span class="keywordtype">void</span> FINCADaINTRO(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00103"></a>00103 <span class="keywordtype">char</span> * toma_parametro(<span class="keywordtype">char</span>* ,<span class="keywordtype">char</span> *); -<a name="l00104"></a>00104 <span class="keywordtype">int</span> ClienteExistente(TramaRepos *); -<a name="l00105"></a>00105 LPVOID GestionaServicioRepositorio(LPVOID); -<a name="l00106"></a>00106 <span class="keywordtype">int</span> Actualizar(TramaRepos*); -<a name="l00107"></a>00107 <span class="keywordtype">int</span> Arrancar(TramaRepos *); -<a name="l00108"></a>00108 <span class="keywordtype">int</span> Wake_Up(SOCKET,<span class="keywordtype">char</span> *); -<a name="l00109"></a>00109 <span class="keywordtype">void</span> PasaHexBin( <span class="keywordtype">char</span> *,<span class="keywordtype">char</span> *); -<a name="l00110"></a>00110 <span class="keywordtype">int</span> levanta(<span class="keywordtype">char</span> *); -<a name="l00111"></a>00111 <span class="keywordtype">int</span> FicheroOperador(TramaRepos *); -<a name="l00112"></a>00112 <span class="keywordtype">int</span> IconoItem(TramaRepos *); -<a name="l00113"></a>00113 -<a name="l00114"></a>00114 <span class="keywordtype">bool</span> ExisteFichero(TramaRepos *); -<a name="l00115"></a>00115 <span class="keywordtype">bool</span> EliminaFichero(TramaRepos *); -<a name="l00116"></a>00116 <span class="keywordtype">bool</span> LeeFicheroTexto(TramaRepos *); -<a name="l00117"></a>00117 <span class="keywordtype">int</span> gestiona_comando(TramaRepos *); -<a name="l00118"></a>00118 <span class="keywordtype">bool</span> respuesta_peticion(TramaRepos *,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*,<span class="keywordtype">char</span>*); -<a name="l00119"></a>00119 <span class="keywordtype">bool</span> RecibePerfilSoftware(TramaRepos *trmInfo); -<a name="l00120"></a>00120 <span class="keywordtype">bool</span> EnviaPerfilSoftware(TramaRepos *trmInfo); -<a name="l00121"></a>00121 SOCKET Abre_conexion(<span class="keywordtype">char</span> *,<span class="keywordtype">int</span>); -<a name="l00122"></a>00122 <span class="keywordtype">int</span> envia_tramas(SOCKET,TRAMA *); -<a name="l00123"></a>00123 <span class="keywordtype">int</span> recibe_tramas(SOCKET ,TRAMA *); -<a name="l00124"></a>00124 <span class="keywordtype">int</span> inclusion_REPO(); -<a name="l00125"></a>00125 <span class="keywordtype">int</span> RESPUESTA_inclusionREPO(TRAMA *); -<a name="l00126"></a>00126 <span class="keywordtype">int</span> TomaRestoConfiguracion(TRAMA *); -<a name="l00127"></a>00127 <span class="keywordtype">int</span> RegistraComando(TramaRepos *); -<a name="l00128"></a>00128 <span class="keywordtype">int</span> Apagar(TramaRepos *); -<a name="l00129"></a>00129 <span class="keywordtype">char</span> * Buffer(<span class="keywordtype">int</span> ); -<a name="l00130"></a>00130 <span class="keywordtype">int</span> TomaPuertoLibre(<span class="keywordtype">int</span> *); -<a name="l00131"></a>00131 <span class="keywordtype">int</span> ejecutarscript ( <span class="keywordtype">char</span> *,<span class="keywordtype">char</span> * ,<span class="keywordtype">char</span> *); -<a name="l00132"></a>00132 <span class="keywordtype">void</span> NwGestionaServicioRepositorio(TramaRepos *); -<a name="l00133"></a>00133 <span class="keywordtype">int</span> ExecShell(<span class="keywordtype">char</span>*,<span class="keywordtype">char</span> *); -</pre></div></div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/index.html b/doc/html/index.html deleted file mode 100644 index 6044c572..00000000 --- a/doc/html/index.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Página principal</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generado por Doxygen 1.5.5 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li class="current"><a href="index.html"><span>Página principal</span></a></li> - <li><a href="files.html"><span>Archivos</span></a></li> - </ul> - </div> -</div> -<div class="contents"> -<h1></h1> -<p> -</div> -<hr size="1"><address style="text-align: right;"><small>Generado el Mon Jun 15 10:24:00 2009 por -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> -</body> -</html> diff --git a/doc/html/tab_b.gif b/doc/html/tab_b.gif Binary files differdeleted file mode 100644 index 0d623483..00000000 --- a/doc/html/tab_b.gif +++ /dev/null diff --git a/doc/html/tab_l.gif b/doc/html/tab_l.gif Binary files differdeleted file mode 100644 index 9b1e6337..00000000 --- a/doc/html/tab_l.gif +++ /dev/null diff --git a/doc/html/tab_r.gif b/doc/html/tab_r.gif Binary files differdeleted file mode 100644 index ce9dd9f5..00000000 --- a/doc/html/tab_r.gif +++ /dev/null diff --git a/doc/html/tabs.css b/doc/html/tabs.css deleted file mode 100644 index 95f00a91..00000000 --- a/doc/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} |