##// END OF EJS Templates
First commit of the Control_Module_Test
imanay -
r14:15
parent child
Show More
@@ -0,0 +1,219
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
No newline at end of file
2 <?fileVersion 4.0.0?>
No newline at end of file
3
No newline at end of file
4 <cproject>
No newline at end of file
5 <storageModule moduleId="org.eclipse.cdt.core.settings">
No newline at end of file
6 <cconfiguration id="cdt.managedbuild.config.gnu.exe.release.967225482">
No newline at end of file
7 <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.967225482" moduleId="org.eclipse.cdt.core.settings" name="Release">
No newline at end of file
8 <externalSettings/>
No newline at end of file
9 <extensions>
No newline at end of file
10 <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
No newline at end of file
11 <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
No newline at end of file
12 <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
No newline at end of file
13 <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
No newline at end of file
14 <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
No newline at end of file
15 </extensions>
No newline at end of file
16 </storageModule>
No newline at end of file
17 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
No newline at end of file
18 <configuration artifactName="Control_Module_Test" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.967225482" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
No newline at end of file
19 <folderInfo id="cdt.managedbuild.config.gnu.exe.release.967225482." name="/" resourcePath="">
No newline at end of file
20 <toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1704877847" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
No newline at end of file
21 <targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.136927403" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
No newline at end of file
22 <builder buildPath="${workspace_loc:/Control_Module_Test/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1213459204" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
No newline at end of file
23 <tool id="cdt.managedbuild.tool.gnu.archiver.base.714912864" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
No newline at end of file
24 <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.60046747" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
No newline at end of file
25 <option id="gnu.cpp.compiler.exe.release.option.optimization.level.1613576554" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
No newline at end of file
26 <option id="gnu.cpp.compiler.exe.release.option.debugging.level.671664230" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
No newline at end of file
27 </tool>
No newline at end of file
28 <tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1261706953" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
No newline at end of file
29 <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1418007451" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
No newline at end of file
30 <option id="gnu.c.compiler.exe.release.option.debugging.level.1736576157" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
No newline at end of file
31 <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.39907267" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
No newline at end of file
32 </tool>
No newline at end of file
33 <tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1836769995" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release">
No newline at end of file
34 <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1152282245" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
No newline at end of file
35 <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
No newline at end of file
36 <additionalInput kind="additionalinput" paths="$(LIBS)"/>
No newline at end of file
37 </inputType>
No newline at end of file
38 </tool>
No newline at end of file
39 <tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1991972445" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
No newline at end of file
40 <tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1322086822" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
No newline at end of file
41 <inputType id="cdt.managedbuild.tool.gnu.assembler.input.913298525" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
No newline at end of file
42 </tool>
No newline at end of file
43 </toolChain>
No newline at end of file
44 </folderInfo>
No newline at end of file
45 </configuration>
No newline at end of file
46 </storageModule>
No newline at end of file
47 <storageModule moduleId="scannerConfiguration">
No newline at end of file
48 <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
No newline at end of file
49 <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
No newline at end of file
50 <buildOutputProvider>
No newline at end of file
51 <openAction enabled="true" filePath=""/>
No newline at end of file
52 <parser enabled="true"/>
No newline at end of file
53 </buildOutputProvider>
No newline at end of file
54 <scannerInfoProvider id="specsFile">
No newline at end of file
55 <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
No newline at end of file
56 <parser enabled="true"/>
No newline at end of file
57 </scannerInfoProvider>
No newline at end of file
58 </profile>
No newline at end of file
59 <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
No newline at end of file
60 <buildOutputProvider>
No newline at end of file
61 <openAction enabled="true" filePath=""/>
No newline at end of file
62 <parser enabled="true"/>
No newline at end of file
63 </buildOutputProvider>
No newline at end of file
64 <scannerInfoProvider id="makefileGenerator">
No newline at end of file
65 <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
No newline at end of file
66 <parser enabled="true"/>
No newline at end of file
67 </scannerInfoProvider>
No newline at end of file
68 </profile>
No newline at end of file
69 <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
No newline at end of file
70 <buildOutputProvider>
No newline at end of file
71 <openAction enabled="true" filePath=""/>
No newline at end of file
72 <parser enabled="true"/>
No newline at end of file
73 </buildOutputProvider>
No newline at end of file
74 <scannerInfoProvider id="specsFile">
No newline at end of file
75 <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
No newline at end of file
76 <parser enabled="true"/>
No newline at end of file
77 </scannerInfoProvider>
No newline at end of file
78 </profile>
No newline at end of file
79 <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
No newline at end of file
80 <buildOutputProvider>
No newline at end of file
81 <openAction enabled="true" filePath=""/>
No newline at end of file
82 <parser enabled="true"/>
No newline at end of file
83 </buildOutputProvider>
No newline at end of file
84 <scannerInfoProvider id="specsFile">
No newline at end of file
85 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
No newline at end of file
86 <parser enabled="true"/>
No newline at end of file
87 </scannerInfoProvider>
No newline at end of file
88 </profile>
No newline at end of file
89 <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
No newline at end of file
90 <buildOutputProvider>
No newline at end of file
91 <openAction enabled="true" filePath=""/>
No newline at end of file
92 <parser enabled="true"/>
No newline at end of file
93 </buildOutputProvider>
No newline at end of file
94 <scannerInfoProvider id="specsFile">
No newline at end of file
95 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
No newline at end of file
96 <parser enabled="true"/>
No newline at end of file
97 </scannerInfoProvider>
No newline at end of file
98 </profile>
No newline at end of file
99 <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
No newline at end of file
100 <buildOutputProvider>
No newline at end of file
101 <openAction enabled="true" filePath=""/>
No newline at end of file
102 <parser enabled="true"/>
No newline at end of file
103 </buildOutputProvider>
No newline at end of file
104 <scannerInfoProvider id="specsFile">
No newline at end of file
105 <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
No newline at end of file
106 <parser enabled="true"/>
No newline at end of file
107 </scannerInfoProvider>
No newline at end of file
108 </profile>
No newline at end of file
109 <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
No newline at end of file
110 <buildOutputProvider>
No newline at end of file
111 <openAction enabled="true" filePath=""/>
No newline at end of file
112 <parser enabled="true"/>
No newline at end of file
113 </buildOutputProvider>
No newline at end of file
114 <scannerInfoProvider id="specsFile">
No newline at end of file
115 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
No newline at end of file
116 <parser enabled="true"/>
No newline at end of file
117 </scannerInfoProvider>
No newline at end of file
118 </profile>
No newline at end of file
119 <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
No newline at end of file
120 <buildOutputProvider>
No newline at end of file
121 <openAction enabled="true" filePath=""/>
No newline at end of file
122 <parser enabled="true"/>
No newline at end of file
123 </buildOutputProvider>
No newline at end of file
124 <scannerInfoProvider id="specsFile">
No newline at end of file
125 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
No newline at end of file
126 <parser enabled="true"/>
No newline at end of file
127 </scannerInfoProvider>
No newline at end of file
128 </profile>
No newline at end of file
129 <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.967225482;cdt.managedbuild.config.gnu.exe.release.967225482.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1261706953;cdt.managedbuild.tool.gnu.c.compiler.input.39907267">
No newline at end of file
130 <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
No newline at end of file
131 <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
No newline at end of file
132 <buildOutputProvider>
No newline at end of file
133 <openAction enabled="true" filePath=""/>
No newline at end of file
134 <parser enabled="true"/>
No newline at end of file
135 </buildOutputProvider>
No newline at end of file
136 <scannerInfoProvider id="specsFile">
No newline at end of file
137 <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
No newline at end of file
138 <parser enabled="true"/>
No newline at end of file
139 </scannerInfoProvider>
No newline at end of file
140 </profile>
No newline at end of file
141 <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
No newline at end of file
142 <buildOutputProvider>
No newline at end of file
143 <openAction enabled="true" filePath=""/>
No newline at end of file
144 <parser enabled="true"/>
No newline at end of file
145 </buildOutputProvider>
No newline at end of file
146 <scannerInfoProvider id="makefileGenerator">
No newline at end of file
147 <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
No newline at end of file
148 <parser enabled="true"/>
No newline at end of file
149 </scannerInfoProvider>
No newline at end of file
150 </profile>
No newline at end of file
151 <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
No newline at end of file
152 <buildOutputProvider>
No newline at end of file
153 <openAction enabled="true" filePath=""/>
No newline at end of file
154 <parser enabled="true"/>
No newline at end of file
155 </buildOutputProvider>
No newline at end of file
156 <scannerInfoProvider id="specsFile">
No newline at end of file
157 <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
No newline at end of file
158 <parser enabled="true"/>
No newline at end of file
159 </scannerInfoProvider>
No newline at end of file
160 </profile>
No newline at end of file
161 <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
No newline at end of file
162 <buildOutputProvider>
No newline at end of file
163 <openAction enabled="true" filePath=""/>
No newline at end of file
164 <parser enabled="true"/>
No newline at end of file
165 </buildOutputProvider>
No newline at end of file
166 <scannerInfoProvider id="specsFile">
No newline at end of file
167 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
No newline at end of file
168 <parser enabled="true"/>
No newline at end of file
169 </scannerInfoProvider>
No newline at end of file
170 </profile>
No newline at end of file
171 <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
No newline at end of file
172 <buildOutputProvider>
No newline at end of file
173 <openAction enabled="true" filePath=""/>
No newline at end of file
174 <parser enabled="true"/>
No newline at end of file
175 </buildOutputProvider>
No newline at end of file
176 <scannerInfoProvider id="specsFile">
No newline at end of file
177 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
No newline at end of file
178 <parser enabled="true"/>
No newline at end of file
179 </scannerInfoProvider>
No newline at end of file
180 </profile>
No newline at end of file
181 <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
No newline at end of file
182 <buildOutputProvider>
No newline at end of file
183 <openAction enabled="true" filePath=""/>
No newline at end of file
184 <parser enabled="true"/>
No newline at end of file
185 </buildOutputProvider>
No newline at end of file
186 <scannerInfoProvider id="specsFile">
No newline at end of file
187 <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
No newline at end of file
188 <parser enabled="true"/>
No newline at end of file
189 </scannerInfoProvider>
No newline at end of file
190 </profile>
No newline at end of file
191 <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
No newline at end of file
192 <buildOutputProvider>
No newline at end of file
193 <openAction enabled="true" filePath=""/>
No newline at end of file
194 <parser enabled="true"/>
No newline at end of file
195 </buildOutputProvider>
No newline at end of file
196 <scannerInfoProvider id="specsFile">
No newline at end of file
197 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
No newline at end of file
198 <parser enabled="true"/>
No newline at end of file
199 </scannerInfoProvider>
No newline at end of file
200 </profile>
No newline at end of file
201 <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
No newline at end of file
202 <buildOutputProvider>
No newline at end of file
203 <openAction enabled="true" filePath=""/>
No newline at end of file
204 <parser enabled="true"/>
No newline at end of file
205 </buildOutputProvider>
No newline at end of file
206 <scannerInfoProvider id="specsFile">
No newline at end of file
207 <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
No newline at end of file
208 <parser enabled="true"/>
No newline at end of file
209 </scannerInfoProvider>
No newline at end of file
210 </profile>
No newline at end of file
211 </scannerConfigBuildInfo>
No newline at end of file
212 </storageModule>
No newline at end of file
213 <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
No newline at end of file
214 </cconfiguration>
No newline at end of file
215 </storageModule>
No newline at end of file
216 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
No newline at end of file
217 <project id="Control_Module_Test.cdt.managedbuild.target.gnu.exe.2090911806" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
No newline at end of file
218 </storageModule>
No newline at end of file
219 </cproject> No newline at end of file
@@ -0,0 +1,81
1 <?xml version="1.0" encoding="UTF-8"?>
No newline at end of file
2 <projectDescription>
No newline at end of file
3 <name>Control_Module_Test</name>
No newline at end of file
4 <comment></comment>
No newline at end of file
5 <projects>
No newline at end of file
6 </projects>
No newline at end of file
7 <buildSpec>
No newline at end of file
8 <buildCommand>
No newline at end of file
9 <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
No newline at end of file
10 <triggers>clean,full,incremental,</triggers>
No newline at end of file
11 <arguments>
No newline at end of file
12 <dictionary>
No newline at end of file
13 <key>?name?</key>
No newline at end of file
14 <value></value>
No newline at end of file
15 </dictionary>
No newline at end of file
16 <dictionary>
No newline at end of file
17 <key>org.eclipse.cdt.make.core.append_environment</key>
No newline at end of file
18 <value>true</value>
No newline at end of file
19 </dictionary>
No newline at end of file
20 <dictionary>
No newline at end of file
21 <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
No newline at end of file
22 <value>all</value>
No newline at end of file
23 </dictionary>
No newline at end of file
24 <dictionary>
No newline at end of file
25 <key>org.eclipse.cdt.make.core.buildArguments</key>
No newline at end of file
26 <value></value>
No newline at end of file
27 </dictionary>
No newline at end of file
28 <dictionary>
No newline at end of file
29 <key>org.eclipse.cdt.make.core.buildCommand</key>
No newline at end of file
30 <value>make</value>
No newline at end of file
31 </dictionary>
No newline at end of file
32 <dictionary>
No newline at end of file
33 <key>org.eclipse.cdt.make.core.buildLocation</key>
No newline at end of file
34 <value>${workspace_loc:/Control_Module_Test/Release}</value>
No newline at end of file
35 </dictionary>
No newline at end of file
36 <dictionary>
No newline at end of file
37 <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
No newline at end of file
38 <value>clean</value>
No newline at end of file
39 </dictionary>
No newline at end of file
40 <dictionary>
No newline at end of file
41 <key>org.eclipse.cdt.make.core.contents</key>
No newline at end of file
42 <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
No newline at end of file
43 </dictionary>
No newline at end of file
44 <dictionary>
No newline at end of file
45 <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
No newline at end of file
46 <value>false</value>
No newline at end of file
47 </dictionary>
No newline at end of file
48 <dictionary>
No newline at end of file
49 <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
No newline at end of file
50 <value>true</value>
No newline at end of file
51 </dictionary>
No newline at end of file
52 <dictionary>
No newline at end of file
53 <key>org.eclipse.cdt.make.core.enableFullBuild</key>
No newline at end of file
54 <value>true</value>
No newline at end of file
55 </dictionary>
No newline at end of file
56 <dictionary>
No newline at end of file
57 <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
No newline at end of file
58 <value>all</value>
No newline at end of file
59 </dictionary>
No newline at end of file
60 <dictionary>
No newline at end of file
61 <key>org.eclipse.cdt.make.core.stopOnError</key>
No newline at end of file
62 <value>true</value>
No newline at end of file
63 </dictionary>
No newline at end of file
64 <dictionary>
No newline at end of file
65 <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
No newline at end of file
66 <value>true</value>
No newline at end of file
67 </dictionary>
No newline at end of file
68 </arguments>
No newline at end of file
69 </buildCommand>
No newline at end of file
70 <buildCommand>
No newline at end of file
71 <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
No newline at end of file
72 <arguments>
No newline at end of file
73 </arguments>
No newline at end of file
74 </buildCommand>
No newline at end of file
75 </buildSpec>
No newline at end of file
76 <natures>
No newline at end of file
77 <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
No newline at end of file
78 <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
No newline at end of file
79 <nature>org.eclipse.cdt.core.cnature</nature>
No newline at end of file
80 </natures>
No newline at end of file
81 </projectDescription> No newline at end of file
@@ -0,0 +1,83
1 /*
No newline at end of file
2 * ClienteUDP.c
No newline at end of file
3 *
No newline at end of file
4 * Fecha de creacion : Nov 2, 2009
No newline at end of file
5 * Ultima modificacion : Nov 19, 2009
No newline at end of file
6 * Autor : Jose Francisco Quenta C.
No newline at end of file
7 */
No newline at end of file
8
No newline at end of file
9 #include <stdio.h>
No newline at end of file
10 #include <stdlib.h>
No newline at end of file
11 #include <string.h>
No newline at end of file
12 #include <unistd.h>
No newline at end of file
13 #include <errno.h>
No newline at end of file
14 #include <sys/types.h>
No newline at end of file
15 #include <sys/socket.h>
No newline at end of file
16 #include <netinet/in.h>
No newline at end of file
17 #include <arpa/inet.h>
No newline at end of file
18 #include <netdb.h>
No newline at end of file
19
No newline at end of file
20 #include "./Librerias/Mensajes.h"
No newline at end of file
21
No newline at end of file
22 #define PUERTO_SERVIDOR 5500
No newline at end of file
23 //#define DIR_SERVIDOR "10.10.12.255"
No newline at end of file
24 #define DIR_SERVIDOR "192.168.1.255"
No newline at end of file
25
No newline at end of file
26 int ClienteUDP(char *opcion, char *valor){
No newline at end of file
27
No newline at end of file
28 int conexion_clienteFD;
No newline at end of file
29 struct sockaddr_in inf_servidor;
No newline at end of file
30
No newline at end of file
31 int broadcast= 1;
No newline at end of file
32 int resultado;
No newline at end of file
33 int numbytes_enviados;
No newline at end of file
34
No newline at end of file
35 char *buff_peticion;
No newline at end of file
36 char *comando= NULL;
No newline at end of file
37
No newline at end of file
38 if (strcmp(opcion,"-l") == 0){ // Se reconoce el comando que se esta enviando
No newline at end of file
39 comando= "CARGA:";
No newline at end of file
40 }else if(strcmp(opcion,"-c") == 0){
No newline at end of file
41 comando= "CAMBIA:";
No newline at end of file
42 }else if(strcmp(opcion,"-ch") == 0){
No newline at end of file
43 comando= "CHEQUEO:";
No newline at end of file
44 }else {
No newline at end of file
45 ERROR("OPCION INCORRECTA: {-l|-c|-ch}");
No newline at end of file
46 return -1;
No newline at end of file
47 }
No newline at end of file
48
No newline at end of file
49 buff_peticion= (char *) malloc(strlen(comando)+1+strlen(valor)+1); // Se arma el buffer a ser enviado.
No newline at end of file
50 strcpy(buff_peticion,comando);
No newline at end of file
51 strcat(buff_peticion,valor);
No newline at end of file
52
No newline at end of file
53 /* Se establece el socket UDP */
No newline at end of file
54 conexion_clienteFD= socket(AF_INET,SOCK_DGRAM,0);
No newline at end of file
55 if (conexion_clienteFD == -1){
No newline at end of file
56 ERROR("No se pudo establecer el socket: socket()");
No newline at end of file
57 return -1;
No newline at end of file
58 }
No newline at end of file
59
No newline at end of file
60 /* Se establece el Broadcast con la funcion setsockpt() */
No newline at end of file
61 resultado= setsockopt(conexion_clienteFD, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast));
No newline at end of file
62 if (resultado == -1){
No newline at end of file
63 ERROR("No se pudo establecer la opcion de Broadcast: setsockopt()");
No newline at end of file
64 return -1;
No newline at end of file
65 }
No newline at end of file
66
No newline at end of file
67 /* Se configura la estructura que contiene la informacion sobre el servidor: inf_servidor */
No newline at end of file
68 inf_servidor.sin_family= AF_INET;
No newline at end of file
69 inf_servidor.sin_port= htons(PUERTO_SERVIDOR);
No newline at end of file
70 inf_servidor.sin_addr.s_addr= inet_addr(DIR_SERVIDOR);
No newline at end of file
71 memset(inf_servidor.sin_zero, '\0', sizeof(inf_servidor.sin_zero));
No newline at end of file
72
No newline at end of file
73 /* Se procede a enviar el buffer */
No newline at end of file
74 numbytes_enviados= sendto(conexion_clienteFD,buff_peticion,strlen(buff_peticion),0,(struct sockaddr *)&inf_servidor,sizeof(inf_servidor));
No newline at end of file
75 if(numbytes_enviados == -1){
No newline at end of file
76 ERROR("Error de envio de datos: sendto()");
No newline at end of file
77 return -1;
No newline at end of file
78 }
No newline at end of file
79
No newline at end of file
80 close(conexion_clienteFD);
No newline at end of file
81
No newline at end of file
82 return 0;
No newline at end of file
83 } No newline at end of file
@@ -0,0 +1,19
1 /*
No newline at end of file
2 * Funciones_ControlERs.h
No newline at end of file
3 *
No newline at end of file
4 * Created on: Jan 14, 2010
No newline at end of file
5 * Author: redes
No newline at end of file
6 */
No newline at end of file
7
No newline at end of file
8 #ifndef FUNCIONES_CONTROLERS_H_
No newline at end of file
9 #define FUNCIONES_CONTROLERS_H_
No newline at end of file
10
No newline at end of file
11 int estado_ERemota(char dir_red[],int dir_inicio,int dir_fin);
No newline at end of file
12
No newline at end of file
13 int envia_experimento(char valor[], int base);
No newline at end of file
14
No newline at end of file
15 int trae_monitoreo(char valor[], int base);
No newline at end of file
16
No newline at end of file
17 int ClienteUDP(char *opcion, char *valor);
No newline at end of file
18
No newline at end of file
19 #endif /* FUNCIONES_CONTROLERS_H_ */ No newline at end of file
@@ -0,0 +1,17
1 /*
No newline at end of file
2 * Mensajes.h
No newline at end of file
3 *
No newline at end of file
4 * Created on: Nov 12, 2009
No newline at end of file
5 * Author: redes
No newline at end of file
6 */
No newline at end of file
7
No newline at end of file
8 #ifndef MENSAJES_H_
No newline at end of file
9 #define MENSAJES_H_
No newline at end of file
10
No newline at end of file
11 void LOG_SERVIDOR(char *mensaje);
No newline at end of file
12 void LOG_CLIENTE(char *mensaje);
No newline at end of file
13 void ERROR_FATAL(char *mensaje);
No newline at end of file
14 void ERROR(char *mensaje);
No newline at end of file
15
No newline at end of file
16
No newline at end of file
17 #endif /* MENSAJES_H_ */ No newline at end of file
@@ -0,0 +1,39
1 /*
No newline at end of file
2 * Mensajes.c
No newline at end of file
3 *
No newline at end of file
4 * Created on: Nov 12, 2009
No newline at end of file
5 * Author: Jose Francisco Quenta
No newline at end of file
6 */
No newline at end of file
7
No newline at end of file
8 #include <stdio.h>
No newline at end of file
9 #include <stdlib.h>
No newline at end of file
10
No newline at end of file
11 /*
No newline at end of file
12 * Imprime mensajes del servidor
No newline at end of file
13 */
No newline at end of file
14 void LOG_SERVIDOR(char *mensaje){
No newline at end of file
15 printf("SERVIDOR: %s\n",mensaje);
No newline at end of file
16 }
No newline at end of file
17
No newline at end of file
18 /*
No newline at end of file
19 * Imprime mensajes del cliente
No newline at end of file
20 */
No newline at end of file
21 void LOG_CLIENTE(char *mensaje){
No newline at end of file
22 printf("CLIENTE: %s\n",mensaje);
No newline at end of file
23 }
No newline at end of file
24
No newline at end of file
25 /*
No newline at end of file
26 * Error no fatal, permite la continuación del programa
No newline at end of file
27 */
No newline at end of file
28 void ERROR(char *mensaje){
No newline at end of file
29 fprintf(stderr, "ERROR. %s\n", mensaje);
No newline at end of file
30 }
No newline at end of file
31
No newline at end of file
32 /*
No newline at end of file
33 * Error fatal, aborta la ejecución del programa con código de salida de error
No newline at end of file
34 */
No newline at end of file
35 void ERROR_FATAL(char *mensaje){
No newline at end of file
36 fprintf(stderr, "ERROR FATAL. %s\n", mensaje);
No newline at end of file
37 exit(EXIT_FAILURE);
No newline at end of file
38 }
No newline at end of file
39 No newline at end of file
@@ -0,0 +1,19
1 /*
No newline at end of file
2 * Prueba_UDP.c
No newline at end of file
3 *
No newline at end of file
4 * Created on: Nov 19, 2009
No newline at end of file
5 * Author: redes
No newline at end of file
6 */
No newline at end of file
7
No newline at end of file
8 #include <stdio.h>
No newline at end of file
9 #include <stdlib.h>
No newline at end of file
10
No newline at end of file
11 #include "./Librerias/Mensajes.h"
No newline at end of file
12 #include "./Librerias/Funciones_ControlER.h"
No newline at end of file
13
No newline at end of file
14 int main(int argc, char *argv[]){
No newline at end of file
15
No newline at end of file
16 ClienteUDP(argv[1],argv[2]);
No newline at end of file
17
No newline at end of file
18 return 0;
No newline at end of file
19 } No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now