Ir a inicioFavoritosRecomiéndanos El Prisma.com - Ingeniería de Sistemas
Inicio > Regresar a Ingeniería de Sistemas 801 visitantes activos
Sockets - Comunicación entre Procesos Distribuidos



Navigation bar
  Start Previous page
 8 of 14 
Next page End 3 4 5 6 7 8 9 10 11 12 13  

}
 
CODIGO FUENTE DE LAS PRINCIPALES FUNCIONES
DE COMUNICACION DE LA SHELL DE COMUNICACIONES
/*  
*-----------------------------------------------------------------  
*
 
*   NOMBRE:      xshine.c  
*                Moisés Fernández Andrés & Miguel Rueda Barranco  
*                
*   DESCRIPCION: Xwindow Shell for Internet network  
*
 
*   FECHA:       06.09.94  
*
 
*------------------------------------------------------------------  
*/  
/*  
*----------------------------------------------------------------  
*   NOMBRE:      shell.h  
*                  
*   DESCRIPCION: cabeceras para la shell de comunicaciones   
*                de xshine  
*            
*   FECHA:       05.09.94   
*  
*---------------------------------------------------------------  
*/  
/*  
*-------------------------------------------------  
*      includes necesarios  
*-------------------------------------------------  
*/  
#include <stdio.h>  
#include <stdlib.h>  
#include <string.h>  
#include <signal.h>  
#include <ctype.h>  
#include <sys/types.h>  
#include <sys/stat.h>  
#include <sys/file.h>    
#include <sys/ioctl.h>   
#include <sys/socket.h>  
#include <sys/socketvar.h>  
#include <sys/un.h>   
#include <netinet/in.h>  
#include <arpa/inet.h>  
#include <netdb.h>  
#ifdef RS6000         /* necesario para sistemas RS/6000 */  
#include <malloc.h>  
#endif  
/*  
*-------------------------------------------  
*       definicion de constantes                      
*-------------------------------------------  
*/  
#define MAX_STRING          50  
#define MAX_TOKENS          100  
#define LONG_MAX_TOKEN      30  
#define MAX_SIMPLE          3  
#define MAX_PIPES           3  
#define NO_ENCONTRADO       -1  
#define REGULAR             -1  
#define PERMISO_DEFECTO     0660  
#define PROTOCOLO_DEFECTO   0  
#define LONG_COLA_DEFECTO   5  
#define SOCKET_DORMIR       1  
#define FALSE               0  
#define TRUE                1  
/*  
*-----------------------------------------  
*             macros                           
*-----------------------------------------  
*/  
#define obtienePuntNodo(a)  (a *) malloc(sizeof(a))      /* para la asignacion */  
                                                        /* de memoria         */  
/*  
*------------------------------------------  
*            tipos enumerados                   
*------------------------------------------  
*/  
enum descriptorEnum { STDIN, STDOUT, STDERR };   
enum pipeEnum { READ, WRITE };  
enum IOEnum { NO_REDIREC, REDIREC_FICHERO,  
              REDIREC_SERVIDOR, REDIREC_CLIENTE, REDIREC_PANT };  
enum socketEnum { CLIENTE, SERVIDOR };  
Previous page Top Next page
Inicio Última Actualización 2/7/2012 Sugerencias
 
Guía MBA y Masters
Conoce los mejores programas de MBA
Executive MBA y Global MBA