Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Socket.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.1.1.1 $
00022 // $Date: 2000/09/15 08:23:16 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/actor/channel/Socket.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/actor/Socket.h
00027 //
00028 // Written: fmk 11/95
00029 // Revised:
00030 //
00031 // Purpose: This file contains all the includes needed by files
00032 // using the Berkeley socket stuff.
00033 
00034 #ifndef Socket_h
00035 #define Socket_h
00036 
00038 extern "C" {
00039 #include <stdio.h>
00040 #include <stdlib.h>
00041 #include <sys/types.h>
00042 #include <sys/socket.h>
00043 #include <netinet/in.h>
00044 #include <string.h>
00045 #include <unistd.h>
00046 #include <netdb.h>
00047 #include <netinet/in.h>
00048 #include <arpa/inet.h>
00049 }
00050 
00051 #include <iostream.h>
00052 #include <bool.h>
00053 
00054 #define MAX_UDP_DATAGRAM 9126
00055 #define MAX_INET_ADDR 28
00056 
00057 #ifdef _ALPHA
00058 
00059 extern "C" int gethostname (char *name, int namelen);
00060 #else
00061 
00062 extern "C" int gethostname (char *name, unsigned int namelen);
00063 #endif
00064 
00066 extern "C" int INET_getsockname(int socket, 
00067     struct sockaddr_in *address, 
00068     int *address_len );
00069 
00071 extern "C" int INET_sendto (int socket,
00072        char *message_addr,
00073        int length,
00074        int flags,
00075        struct sockaddr_in *dest_addr,
00076        int dest_len );
00077 
00079 extern "C" int INET_recvfrom(int socket,
00080         char *buffer,
00081         int length,
00082         int flags,
00083         struct sockaddr_in *address,
00084         int *address_len) ;
00086 extern "C" int INET_bind (int socket,
00087      struct sockaddr_in *address,
00088      int address_len );
00089 
00090 
00091 
00092 #endif 
00093 
00094 
00095 ÿ
Copyright Contact Us