Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

net.h File Reference

#include <sys/socket.h>
#include <sys/types.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>

Go to the source code of this file.

Data Structures

union  artp_receiver

Defines

#define ARTP_NET_H   1

Functions

int rcvrcmp (struct sockaddr *r1, struct sockaddr *r2)
int rcvrcpy (struct sockaddr *dest_rcvr, struct sockaddr *source_rcvr)
int rcvrsz (struct sockaddr *rcvr)


Detailed Description

ARTP socket address manipulating functions.
Author:
Tomas Rebok
Date:
2004

Function Documentation

int rcvrcmp struct sockaddr *    r1,
struct sockaddr *    r2
 

Compare two socket addresses. This function is used for comparing two socket addresses. Structures are compared depending on their address family.

Parameters:
r1  the pointer to the place where the first address information is stored
r2  the pointer to the place where the second address information is stored
Returns:
zero addresses are equal
Returns:
nonzero addresses are different or some error happened (for further information see documentation of file errors.h).

int rcvrcpy struct sockaddr *    dest_rcvr,
struct sockaddr *    source_rcvr
 

Copy socket address. This function copies socket address pointed by source_rcvr parameter into the place pointed by dest_rcvr parameter.

Parameters:
source_rcvr  the pointer to the place where the source socket address is stored.
dest_rcvr  the pointer to the place where the source socket address will be copied to.
Returns:
zero success
Returns:
nonzero related error code if something failed (for further information see documentation of file errors.h).

int rcvrsz struct sockaddr *    rcvr
 

Find out the size of the socket address. This function finds out the size occupied by given socket address.

Parameters:
rcvr  the pointer to the place where the socket address information is stored.
rcvr_len  the pointer to the place where the size of given socket address will be stored.
Returns:
below zero related error code if something failed (for further information see documentation of file errors.h).
Returns:
above zero the size occupied by given socket address.


Generated on Fri May 21 07:50:25 2004 for Active Router Transport Protocol (ARTP) by doxygen1.2.15