2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c8/ssi.c File Reference


Detailed Description

Simple Socket Interface [Sec. 8.4.5].

Definition in file ssi.c.

Go to the source code of this file.

Functions

void set_fd_hwm (SSI *ssip, int fd)
void reset_fd_hwm (SSI *ssip, int fd)
bool make_sockaddr (struct sockaddr *sa, socklen_t *len, const char *name, int domain, bool will_bind)
SSI * ssi_open (const char *name_server, bool server)
bool ssi_close (SSI *ssip)
bool ssi_close_fd (SSI *ssip, int fd)
int ssi_wait_server (SSI *ssip)
int ssi_get_server_fd (SSI *ssip)


Function Documentation

bool make_sockaddr struct sockaddr *  sa,
socklen_t *  len,
const char *  name,
int  domain,
bool  will_bind
 

Definition at line 48 of file ssi.c.

References addrinfo::ai_addr, addrinfo::ai_addrlen, addrinfo::ai_family, addrinfo::ai_flags, addrinfo::ai_socktype, ec_ai, EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, errno, freeaddrinfo(), getaddrinfo(), SSI_NAME_SIZE, sockaddr_un::sun_family, and sockaddr_un::sun_path.

Referenced by ssi_open().

void reset_fd_hwm SSI ssip,
int  fd
[static]
 

Definition at line 42 of file ssi.c.

References SSI::ssi_fd_hwm.

Referenced by ssi_close_fd().

void set_fd_hwm SSI ssip,
int  fd
[static]
 

Definition at line 36 of file ssi.c.

References SSI::ssi_fd_hwm.

Referenced by ssi_open(), and ssi_wait_server().

bool ssi_close SSI ssip  ) 
 

Definition at line 151 of file ssi.c.

References close(), FD_ISSET(), SSI::ssi_domain, SSI::ssi_fd, SSI::ssi_fd_hwm, SSI::ssi_fd_set, SSI::ssi_name_server, SSI::ssi_server, and unlink().

Referenced by main(), and smi_close_skt().

bool ssi_close_fd SSI ssip,
int  fd
 

Definition at line 168 of file ssi.c.

References close(), EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, FD_CLR(), reset_fd_hwm(), and SSI::ssi_fd_set.

Referenced by main(), and smi_receive_getaddr_skt().

int ssi_get_server_fd SSI ssip  ) 
 

Definition at line 216 of file ssi.c.

References SSI::ssi_fd.

Referenced by main(), smi_receive_getaddr_skt(), and smi_send_release_skt().

SSI* ssi_open const char *  name_server,
bool  server
 

Definition at line 99 of file ssi.c.

References bind(), connect(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_false, ec_neg1, ec_null, errno, FD_SET(), FD_ZERO(), listen(), make_sockaddr(), set_fd_hwm(), setsockopt(), socket(), SSI::ssi_domain, SSI::ssi_fd, SSI::ssi_fd_set, SSI::ssi_name_server, SSI::ssi_server, and unlink().

Referenced by main(), and smi_open_skt().

int ssi_wait_server SSI ssip  ) 
 

Definition at line 180 of file ssi.c.

References accept(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_neg1, errno, FD_ISSET(), FD_SET(), select(), set_fd_hwm(), SSI::ssi_fd, SSI::ssi_fd_hwm, SSI::ssi_fd_set, and SSI::ssi_server.

Referenced by main(), and smi_receive_getaddr_skt().


Generated on Fri Apr 23 10:57:10 2004 for AUP2 Example Source by doxygen 1.3.1