@@ -22,17 +22,23 | |||||
22 | #define PUERTO_SERVIDOR 5500 No newline at end of file |
|
22 | #define PUERTO_SERVIDOR 5500 | |
23 | //#define DIR_SERVIDOR "10.10.12.255" No newline at end of file |
|
23 | //#define DIR_SERVIDOR "10.10.12.255" | |
24 | #define DIR_SERVIDOR "192.168.1.255" No newline at end of file |
|
24 | #define DIR_SERVIDOR "192.168.1.255" | |
|
25 | #define TAM_BUFFER 100 | |||
|
No newline at end of file | ||||
|
26 | No newline at end of file | |||
25 | No newline at end of file |
|
27 | ||
26 | int ClienteUDP(char *opcion, char *valor){ No newline at end of file |
|
28 | int ClienteUDP(char *opcion, char *valor){ | |
27 | No newline at end of file |
|
29 | ||
28 | int conexion_clienteFD; |
|
30 | int conexion_clienteFD; | |
No newline at end of file |
|
31 | struct sockaddr_in inf_servidor, inf_servidor_2; | ||
29 | struct sockaddr_in inf_servidor; No newline at end of file |
|
No newline at end of file | ||
|
32 | struct sockaddr_storage inf_cliente; No newline at end of file | |||
30 | No newline at end of file |
|
33 | ||
31 | int broadcast= 1; No newline at end of file |
|
34 | int broadcast= 1; | |
32 | int resultado; No newline at end of file |
|
35 | int resultado; | |
33 | int numbytes_enviados; No newline at end of file |
|
36 | int numbytes_enviados; | |
|
37 | int numbytes_recibidos; | |||
|
No newline at end of file | ||||
|
38 | size_t addr_len; No newline at end of file | |||
34 | No newline at end of file |
|
39 | ||
35 | char *buff_peticion; No newline at end of file |
|
40 | char *buff_peticion; | |
|
41 | char *buff_rx = (char *) malloc(TAM_BUFFER); No newline at end of file | |||
36 | char *comando= NULL; No newline at end of file |
|
42 | char *comando= NULL; | |
37 | No newline at end of file |
|
43 | ||
38 | if (strcmp(opcion,"-l") == 0){ // Se reconoce el comando que se esta enviando No newline at end of file |
|
44 | if (strcmp(opcion,"-l") == 0){ // Se reconoce el comando que se esta enviando |
General Comments 0
You need to be logged in to leave comments.
Login now