alc_socket.c File Reference

Socket functions. More...

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <io.h>
#include "alc_socket.h"

Include dependency graph for alc_socket.c:

Go to the source code of this file.

Functions

int error_socket ()
int close_socket (SOCKET a_socket)
int init_alc_socket (alc_channel_t *ch)
int close_alc_socket (alc_channel_t *ch)


Detailed Description

Socket functions.

Author
peltotal
Date
2007/02/28 08:58:00
Revision
1.49

MAD-ALCLIB: Implementation of ALC/LCT protocols, Compact No-Code FEC, Simple XOR FEC, Reed-Solomon FEC, and RLC Congestion Control protocol. Copyright (c) 2003-2007 TUT - Tampere University of Technology main authors/contacts: jani.peltotalo@tut.fi and sami.peltotalo@tut.fi

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

In addition, as a special exception, TUT - Tampere University of Technology gives permission to link the code of this program with the OpenSSL library (or with modified versions of OpenSSL that use the same license as OpenSSL), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Definition in file alc_socket.c.


Function Documentation

int close_alc_socket ( alc_channel_t ch  ) 

This function closes transmission or receiving socket.

Parameters:
ch pointer to channel
Returns:
0 in success, -1 otherwise

Definition at line 465 of file alc_socket.c.

References alc_session::addr_family, alc_session::addr_type, close_socket(), error_socket(), alc_channel::imr, alc_channel::imr6, alc_session::mode, RECEIVER, alc_channel::rx_sock, alc_channel::s, SENDER, alc_channel::source_imr, alc_session::ssm, and alc_channel::tx_sock.

Referenced by close_alc_channel().

Here is the call graph for this function:

Here is the caller graph for this function:

int close_socket ( SOCKET  a_socket  ) 

This is a private function which closes the socket

Parameters:
a_socket socket to be closed
Returns:
0 in success, -1 otherwise

Definition at line 78 of file alc_socket.c.

Referenced by close_alc_socket(), and init_alc_socket().

Here is the caller graph for this function:

int error_socket (  ) 

This is a private function which reports the error

Returns:
the code error

Definition at line 60 of file alc_socket.c.

Referenced by close_alc_socket(), and init_alc_socket().

Here is the caller graph for this function:

int init_alc_socket ( alc_channel_t ch  ) 

This function creates and initializes transmission or receiving socket.

Parameters:
ch pointer to channel
Returns:
0 in success, -1 otherwise

Definition at line 86 of file alc_socket.c.

References alc_channel::addr, alc_session::addr_family, alc_session::addr_type, alc_channel::addrinfo, close_socket(), alc_session::def_ttl, error_socket(), alc_channel::imr, alc_channel::imr6, alc_channel::intface, alc_channel::intface_name, min, alc_session::mode, alc_channel::port, RECEIVER, RECEIVER_SOCKET_BUFFER_SIZE, alc_channel::remote, alc_channel::remote6, alc_channel::rx_sock, alc_channel::s, SENDER, alc_channel::source_imr, alc_session::src_addr, alc_session::ssm, and alc_channel::tx_sock.

Referenced by open_alc_channel().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri Mar 9 20:00:42 2007 for MAD-FCL by  doxygen 1.5.0