/*
 *  include/net.h
 *
 *  Network utilities
 *
 *  Copyright (C) 2004  Phoenix Grid Computing Project
 *                      ( http://www.logos.ic.i.u-tokyo.ac.jp/phoenix/ )
 *
 *  2004-11-26  Implemented basic functions 
 *              by Kaneda Kenji
 */


#ifndef _NET_H
#define _NET_H


#include "common.h"


int Socket ( int domain, int type, int protocol );
void Bind ( int sockfd, struct sockaddr *my_addr, socklen_t addrlen );
void Listen ( int s, int backlog );
void Setsockopt ( int s, int level, int optname, const void *optval, socklen_t optlen );
void Setsockopt_reuseaddr ( int s );
struct hostent *Gethostbyname ( const char *name )
in_addr_t in_addr_of_hostname ( const char *name )
struct sockaddr_in create_inet_sockaddr ( in_addr_t in_addr, int port )
int tcp_connect( const char *name, int port )
int tcp_listen ( int port )
int tcp_accept ( int fd )


#endif /* _STD_H */
